/* ==========================================================================
   TOAST NOTIFICATION STYLES
   Orchestrated By Heaven Wedding Website
   ========================================================================== */

/* ==========================================================================
   TOAST CONTAINER
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 100%;
    pointer-events: none;
}

/* ==========================================================================
   TOAST ELEMENT
   ========================================================================== */

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    min-width: 280px;
    transform: translateX(120%);
    opacity: 0;
    transition: 
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-dismissing {
    transform: translateX(120%);
    opacity: 0;
}

/* ==========================================================================
   TOAST ICON
   ========================================================================== */

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
    font-weight: bold;
}

/* ==========================================================================
   TOAST TYPES
   ========================================================================== */

/* Success */
.toast-success {
    border-left: 4px solid var(--color-success, #28a745);
}

.toast-success .toast-icon {
    background: rgba(40, 167, 69, 0.15);
    color: var(--color-success, #28a745);
}

/* Error */
.toast-error {
    border-left: 4px solid var(--color-error, #dc3545);
}

.toast-error .toast-icon {
    background: rgba(220, 53, 69, 0.15);
    color: var(--color-error, #dc3545);
}

/* Warning */
.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-warning .toast-icon {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

/* Info */
.toast-info {
    border-left: 4px solid var(--color-gold);
}

.toast-info .toast-icon {
    background: var(--color-gold-lighter);
    color: var(--color-gold);
}

/* ==========================================================================
   TOAST CONTENT
   ========================================================================== */

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: var(--font-size-sm);
    color: var(--color-charcoal);
    line-height: 1.5;
    word-wrap: break-word;
}

/* ==========================================================================
   TOAST ACTION BUTTON
   ========================================================================== */

.toast-action {
    display: inline-block;
    margin-top: var(--space-xs);
    padding: 0;
    background: none;
    border: none;
    color: var(--color-gold);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.toast-action:hover {
    color: var(--color-gold-deep);
}

/* ==========================================================================
   TOAST DISMISS BUTTON
   ========================================================================== */

.toast-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--color-gray);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: 
        background-color 0.2s ease,
        color 0.2s ease;
    flex-shrink: 0;
}

.toast-dismiss:hover {
    background: var(--color-beige-soft);
    color: var(--color-charcoal);
}

/* ==========================================================================
   TOAST PROGRESS BAR
   ========================================================================== */

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    opacity: 0.2;
    transform-origin: left;
    animation: toast-progress-shrink linear forwards;
}

@keyframes toast-progress-shrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
    .toast-container {
        bottom: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        transform: translateY(120%);
    }
    
    .toast-visible {
        transform: translateY(0);
    }
    
    .toast-dismissing {
        transform: translateY(120%);
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .toast-visible {
        transform: none;
    }
    
    .toast-dismissing {
        transform: none;
    }
    
    .toast-progress {
        animation: none;
        display: none;
    }
}
