/**
 * Multi-step Booking Popup Styles
 */

/* Popup Overlay */
.mtb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.mtb-popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Popup Header */
.mtb-popup-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mtb-popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.mtb-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.mtb-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Popup Body */
.mtb-popup-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Step Indicator */
.mtb-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
}

.mtb-step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.mtb-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin: 0 50px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.mtb-step.active .step-number {
    background: #3498db;
    color: white;
}

.mtb-step.completed .step-number {
    background: #27ae60;
    color: white;
}

.mtb-step.active .step-label,
.mtb-step.completed .step-label {
    color: #2c3e50;
    font-weight: 600;
}

/* Step Content */
.mtb-step-content {
    min-height: 400px;
}

.mtb-step-content h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* Calendar Styles */
.mtb-calendar-container {
    max-width: 400px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mtb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mtb-calendar-prev,
.mtb-calendar-next {
    background: #3498db;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.mtb-calendar-prev:hover,
.mtb-calendar-next:hover {
    background: #2980b9;
}

.mtb-calendar-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.mtb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.mtb-calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 8px 0;
}

.mtb-calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.mtb-calendar-date {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mtb-calendar-date.other-month {
    color: #ccc;
    cursor: not-allowed;
}

.mtb-calendar-date.past {
    color: #ccc;
    cursor: not-allowed;
}

.mtb-calendar-date.available {
    background: white;
    color: #2c3e50;
    border: 2px solid transparent;
}

.mtb-calendar-date.available:hover {
    background: #e3f2fd;
    border-color: #3498db;
}

.mtb-calendar-date.selected {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.mtb-calendar-date.today::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #e74c3c;
    border-radius: 50%;
}

/* Package Styles */
.mtb-packages-container {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

.mtb-package-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.mtb-package-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

.mtb-package-info h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.mtb-package-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.mtb-package-categories {
    display: grid;
    gap: 15px;
}

.mtb-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.category-name {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.category-price {
    font-weight: 600;
    color: #27ae60;
    margin: 0 15px;
    font-size: 16px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.qty-btn:hover {
    background: #2980b9;
}

.qty-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.mtb-package-quantity {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* Step Actions */
.mtb-step-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.mtb-step-actions button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.mtb-step-next,
.mtb-finalize-booking {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.mtb-step-next:hover,
.mtb-finalize-booking:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.mtb-step-prev {
    background: #95a5a6;
    color: white;
}

.mtb-step-prev:hover {
    background: #7f8c8d;
}

.mtb-step-actions button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Summary Bar */
.mtb-summary-bar {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-top: 1px solid #e0e0e0;
    padding: 20px 30px;
}

.mtb-summary-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mtb-summary-item {
    text-align: center;
}

.mtb-summary-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mtb-summary-item .value {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

#mtb-summary-total {
    color: #27ae60;
    font-size: 18px;
}

/* Body class when popup is open */
body.mtb-popup-open {
    overflow: hidden;
}

/* Book Now Button */
.mtb-book-now-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mtb-book-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mtb-popup-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .mtb-popup-header {
        padding: 15px 20px;
    }
    
    .mtb-popup-title {
        font-size: 20px;
    }
    
    .mtb-popup-body {
        padding: 20px;
        max-height: 70vh;
    }
    
    .mtb-step {
        margin: 0 20px;
    }
    
    .mtb-step-indicator::before {
        width: 120px;
    }
    
    .mtb-calendar-container {
        padding: 15px;
    }
    
    .mtb-package-item {
        padding: 15px;
    }
    
    .mtb-category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .category-price {
        margin: 0;
    }
    
    .mtb-summary-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .mtb-summary-bar {
        padding: 15px 20px;
    }
    
    .mtb-step-actions {
        flex-direction: column;
    }
    
    .mtb-step-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mtb-popup-content {
        width: 98%;
        margin: 10px;
    }
    
    .mtb-calendar-dates {
        gap: 2px;
    }
    
    .mtb-calendar-date {
        font-size: 12px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .mtb-step {
        margin: 0 10px;
    }
}

/* Loading States */
.mtb-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.mtb-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Scrollbar Styling */
.mtb-popup-body::-webkit-scrollbar,
.mtb-packages-container::-webkit-scrollbar {
    width: 6px;
}

.mtb-popup-body::-webkit-scrollbar-track,
.mtb-packages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mtb-popup-body::-webkit-scrollbar-thumb,
.mtb-packages-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.mtb-popup-body::-webkit-scrollbar-thumb:hover,
.mtb-packages-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}