/* Booking Modal Styles */

.modal-content {
    overflow-y: auto;
    /* keep scrolling */

    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.booking-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.booking-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #2a3e50, #000000);
    color: white;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.modal-header .tour-info {
    margin-top: 10px;
    opacity: 0.9;
    font-size: 14px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgb(255, 255, 255);
    font-size: 14px;
}


.form-group label.required::after {
    content: " *";
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control option {
    background-color: #2c3e50;
    color: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.tour-summary {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.tour-summary h3 {
    margin: 0 0 15px 0;
    color: #3498db;
    font-size: 18px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 16px;
    color: #3498db;
}

.summary-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.summary-value {
    color: white;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    flex: 1;
}



.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    /* ❌ THIS CAUSES THE WEIRD ANIMATION */
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* REPLACE with this FIXED version: */

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    position: relative;
    /* Added for better control */
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    /* REMOVED: transform: translateY(-2px); */
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:disabled {
    background: #7f8c8d !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    /* Prevent any hover effects when disabled */
    pointer-events: none;
}

/* Alternative: If you want to keep the lift effect but prevent it during loading */
.btn-primary:hover:not(:disabled):not(.loading) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Style for loading state */
.btn-primary.loading {
    background: #7f8c8d;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* Make sure the loading spinner doesn't inherit weird transforms */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    /* Ensure spinner stays in place */
    vertical-align: middle;
    transform: none !important;
}

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

.success-message,
.error-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.success-message {
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid rgba(39, 174, 96, 0.5);
    color: #27ae60;
}

.error-message {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .booking-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }
}

/* Enhanced Booking Modal Styles */
.booking-step {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.booking-step:hover {
    background: #f1f3f4;
    border-left-color: #5a67d8;
}

.step-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.step-number {
    background: #667eea;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.enhanced-date-selector {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.enhanced-date-selector:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.selected-date-details {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.date-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.urgency-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.urgency-badge.urgent {
    background: rgba(245, 101, 101, 0.9);
    animation: pulse 2s infinite;
}

.urgency-badge.limited {
    background: rgba(237, 137, 54, 0.9);
}

.urgency-badge.available {
    background: rgba(72, 187, 120, 0.9);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.date-card-body {
    padding: 1.5rem;
}

.date-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: #2d3748;
    font-weight: 600;
}

.availability-visual {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.availability-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.availability-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.availability-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.6s ease;
    border-radius: 4px;
}

.availability-fill.limited {
    background: linear-gradient(90deg, #ed8936, #dd6b20);
}

.availability-fill.urgent {
    background: linear-gradient(90deg, #f56565, #e53e3e);
}

.availability-text {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* Success state styling */
.booking-step.completed {
    border-left-color: #48bb78;
    background: #f0fff4;
}

.booking-step.completed .step-number {
    background: #48bb78;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .booking-step {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .step-label {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .date-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .date-card-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .availability-bar-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .availability-text {
        text-align: center;
    }
}
/* Selected Date Display Styles */
.selected-date-display {
    margin-bottom: 1rem;
}

.date-display-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.date-icon {
    font-size: 1.5rem;
    opacity: 0.9;
}

.date-info {
    flex: 1;
}

.date-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.date-hint {
    font-size: 0.85rem;
    opacity: 0.8;
    font-style: italic;
}

/* Error message styling fix */
.no-dates-container,
.error-state {
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    color: #856404 !important;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.contact-buttons button {
    background: #ffc107 !important;
    color: #212529 !important;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    margin: 0 0.5rem;
    cursor: pointer;
}

.contact-buttons button:hover {
    background: #e0a800 !important;
}

/* Flash Message Styles */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.flash-message.show {
    transform: translateX(0);
    opacity: 1;
}

.flash-content {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid #28a745;
}

.flash-content.success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #f0fff4 100%);
}

.flash-content.error {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8 0%, #fff5f5 100%);
}

.flash-content.warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fffef7 0%, #fffbf0 100%);
}

.flash-content.info {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #f7feff 0%, #f0fcff 100%);
}

.flash-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.flash-text {
    flex: 1;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.flash-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .flash-message {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .flash-message.show {
        transform: translateY(0);
    }
    
    .flash-content {
        min-width: auto;
        max-width: none;
    }
}
