/* ========================================
   POSHPEARL MICRO-INTERACTIONS
   Premium 200-300ms animations
   ======================================== */

/* ===================
   TRANSITIONS & TIMING
   =================== */
:root {
    --transition-quick: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-elegant: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================
   BUTTON RIPPLE EFFECT
   =================== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolutely;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width var(--transition-elegant), height var(--transition-elegant);
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Gold shimmer on hover */
.btn-gold-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-gold-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.5s;
}

.btn-gold-shimmer:hover::after {
    left: 100%;
}

/* ===================
   CARD ANIMATIONS
   =================== */
.card-lift {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(245, 166, 35, 0.2);
}

.card-scale {
    transition: transform var(--transition-smooth);
}

.card-scale:hover {
    transform: scale(1.02);
}

/* Burgundy glow effect */
.card-glow-burgundy:hover {
    box-shadow: 0 0 30px rgba(92, 46, 46, 0.6);
}

.card-glow-gold:hover {
    box-shadow: 0 0 30px rgba(245, 166, 35, 0.4);
}

/* ===================
   LOADING STATES
   =================== */

/* Gold spinner */
.spinner-gold {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(245, 166, 35, 0.2);
    border-top-color: var(--pp-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton loader with burgundy shimmer */
.skeleton {
    background: linear-gradient(90deg,
            var(--pp-burgundy-dark) 0%,
            var(--pp-burgundy) 50%,
            var(--pp-burgundy-dark) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--pp-radius-md);
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
}

/* ===================
   TOAST NOTIFICATIONS
   =================== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast-burgundy {
    min-width: 300px;
    background: linear-gradient(135deg, var(--pp-burgundy-dark), var(--pp-burgundy));
    border: 2px solid var(--pp-gold);
    border-radius: var(--pp-radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: toast-slide-in var(--transition-elegant) var(--ease-out-expo);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-burgundy.toast-exit {
    animation: toast-slide-out var(--transition-smooth);
}

@keyframes toast-slide-out {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--pp-gold);
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
    color: var(--pp-white);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--pp-white);
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity var(--transition-quick);
}

.toast-close:hover {
    opacity: 1;
}

/* Toast variants */
.toast-success .toast-icon {
    color: var(--pp-success);
}

.toast-error .toast-icon {
    color: var(--pp-danger);
}

.toast-warning .toast-icon {
    color: var(--pp-warning);
}

/* ===================
   PROGRESS INDICATORS
   =================== */

/* Multi-step progress */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--pp-gray-dark);
    z-index: -1;
}

.progress-step:last-child::before {
    display: none;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pp-burgundy-dark);
    border: 2px solid var(--pp-gray-dark);
    color: var(--pp-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all var(--transition-smooth);
}

.progress-step.active .progress-step-circle {
    background: var(--pp-gold);
    border-color: var(--pp-gold);
    color: var(--pp-charcoal);
    box-shadow: 0 0 20px rgba(245, 166, 35, 0.5);
}

.progress-step.completed .progress-step-circle {
    background: var(--pp-burgundy);
    border-color: var(--pp-gold);
    color: var(--pp-gold);
}

.progress-step.completed::before {
    background: var(--pp-gold);
}

.progress-step-label {
    font-size: 0.875rem;
    color: var(--pp-gray);
    transition: color var(--transition-quick);
}

.progress-step.active .progress-step-label {
    color: var(--pp-gold);
    font-weight: 600;
}

/* Animated progress bar */
.progress-animated {
    background: var(--pp-burgundy-dark);
    border-radius: var(--pp-radius-lg);
    overflow: hidden;
    height: 8px;
}

.progress-bar-gold {
    background: linear-gradient(90deg, var(--pp-gold-dark), var(--pp-gold), var(--pp-gold-light));
    height: 100%;
    transition: width var(--transition-elegant);
    position: relative;
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ===================
   PULSE ANIMATIONS
   =================== */
.pulse-gold {
    animation: pulse-gold 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-gold {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(245, 166, 35, 0);
    }
}

.pulse-burgundy {
    animation: pulse-burgundy 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-burgundy {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(92, 46, 46, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(92, 46, 46, 0);
    }
}

/* ===================
   SMOOTH SCROLL
   =================== */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ===================
   MODAL ANIMATIONS
   =================== */
.modal.fade .modal-dialog {
    transition: transform var(--transition-elegant), opacity var(--transition-elegant);
}

.modal.show .modal-dialog {
    animation: modal-bounce-in var(--transition-elegant) var(--ease-out-expo);
}

@keyframes modal-bounce-in {
    0% {
        transform: scale(0.9) translateY(-30px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===================
   COUNTER ANIMATION
   =================== */
.counter-animate {
    animation: counter-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes counter-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ===================
   BADGE NOTIFICATIONS
   =================== */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    animation: badge-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes badge-ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ===================
   ACCORDION SMOOTH
   =================== */
.accordion-button {
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

.accordion-button:not(.collapsed) {
    background-color: var(--pp-burgundy);
    color: var(--pp-gold);
}

.accordion-collapse {
    transition: height var(--transition-elegant);
}

/* ===================
   FORM FOCUS GLOW
   =================== */
.form-control:focus {
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.15);
    transition: box-shadow var(--transition-smooth);
}

/* ===================
   RESPONSIVE
   =================== */
@media (max-width: 768px) {
    .toast-burgundy {
        min-width: 280px;
    }

    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
    }

    .progress-step-label {
        font-size: 0.75rem;
    }
}

/* ===================
   ACCESSIBILITY
   =================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}