/**
 * WuBook Toast Manager Styles
 * 
 * Modern toast notification system matching the provided design
 */

/* Toast Container */
.wubook-toast-container {
    position: fixed;
    top: 150px;
    right: 20px;
    z-index: 99999;
    max-width: 400px;
    pointer-events: none;
}

/* Base Toast Styles */
.wubook-toast {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    padding: 16px 20px;
    border: none;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wubook-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Toast Type Colors */
.wubook-toast.toast-success {
    background: #d1f2d1;
    color: #2d5a2d;
}

.wubook-toast.toast-warning {
    background: #f5e6a8;
    color: #6b5b00;
}

.wubook-toast.toast-info {
    background: #b3e5fc;
    color: #0d47a1;
}

.wubook-toast.toast-error {
    background: #ffcdd2;
    color: #c62828;
}

/* Toast Icon */
.wubook-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.wubook-toast.toast-success .wubook-toast-icon {
    background: #4caf50;
    color: white;
}

.wubook-toast.toast-warning .wubook-toast-icon {
    background: #ff9800;
    color: white;
}

.wubook-toast.toast-info .wubook-toast-icon {
    background: #2196f3;
    color: white;
}

.wubook-toast.toast-error .wubook-toast-icon {
    background: #f44336;
    color: white;
}

/* Toast Content */
.wubook-toast-content {
    flex: 1;
    min-width: 0;
}

.wubook-toast-header {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.wubook-toast.toast-success .wubook-toast-header {
    color: #2e7d32;
}

.wubook-toast.toast-warning .wubook-toast-header {
    color: #e65100;
}

.wubook-toast.toast-info .wubook-toast-header {
    color: #1565c0;
}

.wubook-toast.toast-error .wubook-toast-header {
    color: #c62828;
}

/* Toast Message */
.wubook-toast-message {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
}

.wubook-toast.toast-success .wubook-toast-message {
    color: #2e7d32;
}

.wubook-toast.toast-warning .wubook-toast-message {
    color: #e65100;
}

.wubook-toast.toast-info .wubook-toast-message {
    color: #1565c0;
}

.wubook-toast.toast-error .wubook-toast-message {
    color: #c62828;
}

/* Close Button */
.wubook-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

.wubook-toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.wubook-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wubook-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform: translateX(-100%);
    transition: transform linear;
}

/* Progress Bar Colors by Type */
.wubook-toast.toast-success .wubook-toast-progress-bar {
    background: #4caf50;
}

.wubook-toast.toast-warning .wubook-toast-progress-bar {
    background: #ff9800;
}

.wubook-toast.toast-info .wubook-toast-progress-bar {
    background: #2196f3;
}

.wubook-toast.toast-error .wubook-toast-progress-bar {
    background: #f44336;
}

/* Hover Effects */
.wubook-toast:hover .wubook-toast-progress-bar {
    animation-play-state: paused;
}

.wubook-toast:hover {
    transform: translateX(-2px);
}

/* Animation Keyframes */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Stacking Animation */
.wubook-toast:not(:last-child) {
    margin-bottom: 8px;
}

.wubook-toast + .wubook-toast {
    animation-delay: 0.1s;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wubook-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .wubook-toast {
        margin-bottom: 10px;
        padding: 14px 16px;
    }

    .wubook-toast-header {
        font-size: 15px;
    }

    .wubook-toast-message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wubook-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .wubook-toast {
        padding: 12px 14px;
        margin-bottom: 8px;
        gap: 10px;
    }

    .wubook-toast-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .wubook-toast-header {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .wubook-toast-message {
        font-size: 12px;
    }

    .wubook-toast-close {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wubook-toast {
        border: 2px solid;
    }
    
    .wubook-toast.toast-success {
        border-color: #28a745;
    }
    
    .wubook-toast.toast-warning {
        border-color: #ffc107;
    }
    
    .wubook-toast.toast-info {
        border-color: #17a2b8;
    }
    
    .wubook-toast.toast-error {
        border-color: #dc3545;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .wubook-toast {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .wubook-toast.show {
        transform: none;
    }
    
    .wubook-toast-progress-bar {
        transition: none;
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wubook-toast {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .wubook-toast-header {
        color: #f7fafc;
    }
    
    .wubook-toast-message {
        color: #cbd5e0;
    }
    
    .wubook-toast-close {
        color: #a0aec0;
    }
    
    .wubook-toast-close:hover {
        color: #f7fafc;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .wubook-toast-progress {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Focus Management */
.wubook-toast:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .wubook-toast-container {
        display: none;
    }
}
/* Form 
validation error styles */
.wubook-booking-form .error {
    border-color: #dc3545 !important;
}

.wubook-booking-form .error:focus {
    border-color: #dc3545 !important;
}

/* Loading states */
.wubook-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wubook-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: wubook-spin 1s linear infinite;
}

@keyframes wubook-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success states */
.wubook-success {
    border-color: #28a745 !important;
}

/* Warning states */
.wubook-warning {
    border-color: #ffc107 !important;
}