/**
 * API Integration Styles
 * Styles for authentication UI, booking modal, and API-related components
 */

/* ================================
   Authentication UI Styles
   ================================ */

.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0077B5;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-signin:hover {
    background: #005885;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6366f1;
}

.user-name {
    font-weight: 600;
    color: #1f2937;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-btn i {
    color: #6b7280;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-profile-btn:hover i {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #6366f1;
}

.dropdown-item i {
    width: 20px;
    font-size: 16px;
}

/* ================================
   Booking Modal Styles
   ================================ */

.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(132, 33, 41, 0.85);
    backdrop-filter: blur(8px);
}

.booking-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 25px 70px rgba(132, 33, 41, 0.4);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.booking-modal-close {
    position: absolute;
    top: 32px;
    right: 20px;
    background: white;
    border: 2px solid #e5e7eb;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
    z-index: 10;
}

.booking-modal-close:hover {
    background: #fef2f2;
    border-color: #842129;
    color: #842129;
    transform: rotate(90deg);
}

.booking-modal-content h2 {
    color: white;
    margin: 0;
    padding: 32px 40px;
    background: linear-gradient(135deg, #842129, #72111A);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    position: relative;
}

.booking-modal-content h2 i {
    color: white;
    font-size: 24px;
}

.booking-event-info {
    background: #fef2f2;
    padding: 24px;
    margin: 32px 40px;
    border-radius: 16px;
    border-left: 4px solid #842129;
}

.booking-event-info h3 {
    color: #72111A;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
}

.booking-event-info p {
    color: #6b7280;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.booking-event-info i {
    color: #842129;
    width: 20px;
    font-size: 16px;
}

/* Form Styles */
.form-group {
    margin: 0 40px 24px 40px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Raleway', sans-serif;
    font-size: 15px;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #842129;
    box-shadow: 0 0 0 4px rgba(132, 33, 41, 0.1);
}

.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px 40px 32px 40px;
    background: #fafafa;
    border-radius: 0 0 20px 20px;
}

.btn-cancel,
.btn-confirm {
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.btn-cancel {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.btn-confirm {
    background: linear-gradient(135deg, #842129, #72111A);
    color: white;
    box-shadow: 0 4px 12px rgba(132, 33, 41, 0.3);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(132, 33, 41, 0.4);
}

.btn-confirm:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Booking Success */
.booking-success {
    text-align: center;
    padding: 40px;
}

.booking-success i {
    font-size: 72px;
    color: #10b981;
    margin-bottom: 24px;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.booking-success h3 {
    color: #72111A;
    margin-bottom: 16px;
    font-size: 26px;
    font-weight: 700;
}

.booking-success p {
    color: #6b7280;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.booking-success strong {
    color: #842129;
    font-size: 18px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #842129, #72111A);
    color: white;
    padding: 14px 36px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(132, 33, 41, 0.3);
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(132, 33, 41, 0.4);
}

/* ================================
   Loading & Error States
   ================================ */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    margin: 16px 0;
}

.success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #10b981;
    margin: 16px 0;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .btn-signin {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
    }
    
    .btn-signin .signin-text {
        display: none;
    }
    
    .btn-signin i {
        font-size: 22px;
        margin: 0;
        display: block;
    }
    
    .booking-modal-content {
        width: 95%;
        border-radius: 16px;
    }
    
    .booking-modal-content h2 {
        padding: 24px 30px;
        font-size: 24px;
        border-radius: 16px 16px 0 0;
    }
    
    .booking-modal-close {
        top: 24px;
        right: 20px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .booking-event-info,
    .form-group {
        margin-left: 30px;
        margin-right: 30px;
    }
    
    .form-actions {
        padding: 20px 30px 28px 30px;
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-confirm {
        width: 100%;
        justify-content: center;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .booking-modal-content h2 {
        padding: 20px 24px;
        font-size: 22px;
    }
    
    .booking-event-info,
    .form-group {
        margin-left: 24px;
        margin-right: 24px;
    }
    
    .booking-event-info {
        padding: 20px;
    }
    
    .booking-event-info h3 {
        font-size: 18px;
    }
    
    .form-actions {
        padding: 16px 24px 24px 24px;
    }
    
    .btn-signin {
        font-size: 13px;
        padding: 8px 14px;
        gap: 6px;
        white-space: nowrap;
    }
}
