/* =============================================
   TOAST NOTIFICATION SYSTEM
   HairSpot Barbershop
   ============================================= */

/* Toast Container - positioned at top of viewport */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: 100%;
    max-width: 500px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Individual Toast */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    min-width: 280px;
    max-width: 100%;
    opacity: 0;
    transform: translateY(-20px);
    animation: toastSlideIn 0.4s ease forwards;
}

/* Toast Exit Animation */
.toast.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
}

/* Success Toast */
.toast.toast-success .toast-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.toast.toast-success .toast-message {
    color: #059669;
}

/* Error Toast */
.toast.toast-error .toast-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.toast.toast-error .toast-message {
    color: #dc2626;
}

/* Toast Message */
.toast-message {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    padding: 0;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.toast-close:hover {
    color: #6b7280;
    background: rgba(0, 0, 0, 0.05);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear forwards;
}

.toast.toast-success .toast-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.toast.toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Animations */
@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

@keyframes toastProgress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */

/* Tablet */
@media (max-width: 768px) {
    .toast-container {
        top: 15px;
        max-width: 420px;
        padding: 0 12px;
    }

    .toast {
        padding: 12px 16px;
        gap: 10px;
        min-width: 260px;
        border-radius: 10px;
    }

    .toast-icon {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }

    .toast-message {
        font-size: 13px;
    }

    .toast-close {
        width: 22px;
        height: 22px;
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        padding: 0 10px;
        max-width: 100%;
    }

    .toast {
        padding: 12px 14px;
        gap: 8px;
        min-width: unset;
        width: 100%;
        border-radius: 8px;
    }

    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .toast-message {
        font-size: 12px;
    }

    .toast-close {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .toast-container {
        top: 8px;
        padding: 0 8px;
    }

    .toast {
        padding: 10px 12px;
    }

    .toast-message {
        font-size: 11px;
    }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

/* High contrast mode */
@media (prefers-contrast: high) {
    .toast {
        border: 2px solid currentColor;
    }

    .toast.toast-success {
        border-color: #059669;
    }

    .toast.toast-error {
        border-color: #dc2626;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        opacity: 1;
        transform: translateY(0);
    }

    .toast.toast-exit {
        animation: none;
        opacity: 0;
    }

    .toast-progress {
        animation: none;
        width: 0%;
    }
}
