/* Tactical Legacy Scheduler - Booking Modal Styles */

:root {
    --tls-navy: #0B1F2A;
    --tls-gold: #C8A96A;
    --tls-white: #FFFFFF;
    --tls-olive: #4A5D52;
    --tls-light-gray: #F2F4F6;
}

/* Trigger Button */
.tls-booking-trigger.tls-trigger-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--tls-gold);
    color: var(--tls-navy);
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(11, 31, 42, 0.15);
}

.tls-booking-trigger.tls-trigger-button:hover {
    background: #B8995A;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(11, 31, 42, 0.2);
}

.tls-booking-trigger.tls-trigger-image {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.tls-booking-trigger.tls-trigger-image:hover {
    transform: scale(1.05);
}

/* Modal */
.tls-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tls-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 31, 42, 0.85);
    backdrop-filter: blur(5px);
}

.tls-modal-container {
    position: relative;
    background: var(--tls-white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(11, 31, 42, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tls-modal-header {
    background: linear-gradient(135deg, var(--tls-navy) 0%, var(--tls-olive) 100%);
    color: var(--tls-white);
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tls-modal-header h2 {
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #FFFFFF;
}

.tls-modal-close {
    background: none;
    border: none;
    color: var(--tls-white);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.tls-modal-close:hover {
    transform: rotate(90deg);
}

.tls-modal-body {
    padding: 30px;
}

/* Form Steps */
.tls-form-step h3 {
    color: var(--tls-navy);
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tls-gold);
}

.tls-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.tls-form-group {
    margin-bottom: 20px;
}

.tls-form-group label {
    display: block;
    color: var(--tls-navy);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.tls-form-group label .required {
    color: #DC3545;
}

.tls-form-group input[type="text"],
.tls-form-group input[type="email"],
.tls-form-group input[type="tel"],
.tls-form-group input[type="date"],
.tls-form-group select,
.tls-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--tls-light-gray);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tls-form-group input:focus,
.tls-form-group select:focus,
.tls-form-group textarea:focus {
    outline: none;
    border-color: var(--tls-gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.1);
}

.tls-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.tls-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
}

.tls-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Time Slots */
.tls-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.tls-time-slot {
    padding: 12px;
    background: var(--tls-light-gray);
    border: 2px solid var(--tls-light-gray);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--tls-navy);
}

.tls-time-slot:hover {
    background: var(--tls-white);
    border-color: var(--tls-gold);
    transform: translateY(-2px);
}

.tls-time-slot.selected {
    background: var(--tls-gold);
    border-color: var(--tls-gold);
    color: var(--tls-navy);
}

.tls-loading {
    text-align: center;
    color: var(--tls-olive);
    font-style: italic;
    padding: 20px;
}

.tls-no-slots {
    text-align: center;
    color: var(--tls-olive);
    padding: 20px;
    background: var(--tls-light-gray);
    border-radius: 8px;
}

/* Exception Request */
.tls-exception-request {
    margin-top: 20px;
    padding: 15px;
    background: var(--tls-light-gray);
    border-radius: 8px;
    text-align: center;
}

.tls-exception-request p {
    margin: 0 0 10px 0;
    color: var(--tls-olive);
}

/* Booking Summary */
.tls-booking-summary {
    background: var(--tls-light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tls-booking-summary h4 {
    margin: 0 0 15px 0;
    color: var(--tls-navy);
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.tls-booking-summary p {
    margin: 8px 0;
    color: var(--tls-navy);
}

.tls-booking-summary strong {
    color: var(--tls-olive);
}

/* Buttons */
.tls-btn {
    padding: 12px 30px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.tls-btn-primary {
    background: var(--tls-gold);
    color: var(--tls-navy);
    box-shadow: 0 4px 8px rgba(11, 31, 42, 0.15);
}

.tls-btn-primary:hover:not(:disabled) {
    background: #B8995A;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(11, 31, 42, 0.2);
}

.tls-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tls-btn-secondary {
    background: transparent;
    color: var(--tls-navy);
    border: 2px solid var(--tls-navy);
}

.tls-btn-secondary:hover {
    background: var(--tls-navy);
    color: var(--tls-white);
}

.tls-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Success Message */
.tls-success-message {
    text-align: center;
    padding: 40px 20px;
}

.tls-success-icon {
    width: 80px;
    height: 80px;
    background: #28A745;
    color: var(--tls-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.tls-success-message h3 {
    color: var(--tls-navy);
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 28px;
    margin: 0 0 15px 0;
}

.tls-success-message p {
    color: var(--tls-olive);
    font-size: 16px;
    margin-bottom: 20px;
}

#tls-success-details {
    background: var(--tls-light-gray);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

#tls-success-details p {
    margin: 8px 0;
    color: var(--tls-navy);
}

/* Error Messages */
.tls-error-message {
    background: #F8D7DA;
    color: #721C24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #DC3545;
}

/* Loading State */
.tls-btn.loading {
    position: relative;
    color: transparent;
}

.tls-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--tls-navy);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .tls-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .tls-modal-header {
        padding: 20px;
    }
    
    .tls-modal-header h2 {
        font-size: 20px;
    }
    
    .tls-modal-body {
        padding: 20px;
    }
    
    .tls-form-row {
        grid-template-columns: 1fr;
    }
    
    .tls-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .tls-form-actions {
        flex-direction: column;
    }
    
    .tls-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tls-modal-header h2 {
        font-size: 18px;
    }
    
    .tls-time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Enhanced Flatpickr Inline Calendar Styles */
.tls-calendar-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.tls-calendar-wrapper .flatpickr-calendar {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    margin-top: 10px !important;
}

.tls-calendar-wrapper .flatpickr-calendar.inline {
    display: block !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

.tls-calendar-input {
    display: none !important;
}

/* Make available dates more visible */
.flatpickr-day.available {
    background-color: #ff6b35 !important;
    color: white !important;
    font-weight: bold !important;
    border-color: #ff6b35 !important;
}

.flatpickr-day.available:hover {
    background-color: #e55a2b !important;
    border-color: #e55a2b !important;
}

.flatpickr-day.selected.available {
    background-color: #d94d1f !important;
    border-color: #d94d1f !important;
}

/* Loading state for calendar */
.tls-calendar-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tls-calendar-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.tls-calendar-loading::after {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
