/* Room Occupancy and Quantity Controls Styling */

/* Occupancy Controls Container - Match Site Style */
.occupancy-controls {
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 120, 212, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(0, 120, 212, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.occupancy-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.occupancy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.occupancy-item label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Room Quantity Section - Inline with Book Now */
.room-quantity-section {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-control label {
    font-size: 10px;
    font-weight: 600;
    color: #0078d4;
    margin: 0;
    white-space: nowrap;
}

/* Stepper Controls - Match Site Design */
.stepper-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stepper-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0, 120, 212, 0.3);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    color: #0078d4;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stepper-btn:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
    border-color: #0078d4;
    color: #0078d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 120, 212, 0.2);
}

.stepper-btn:active {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 120, 212, 0.3);
}

.stepper-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stepper-input {
    width: 36px;
    height: 28px;
    text-align: center;
    border: 1px solid rgba(0, 120, 212, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    color: #333;
    padding: 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.stepper-input:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

/* Hide webkit spin buttons for proper centering */
.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0;
    display: none;
}

/* Invalid Combination Styling */
.occupancy-controls.invalid-combination {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.occupancy-controls.invalid-combination::after {
    content: "⚠️ Invalid guest combination";
    display: block;
    font-size: 10px;
    color: #dc3545;
    margin-top: 6px;
    font-weight: 500;
}

/* Dark Theme Styles */
[data-theme="dark"] .occupancy-controls {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(88, 166, 255, 0.05) 100%);
    border-color: rgba(88, 166, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .occupancy-subtitle {
    color: #58a6ff;
}

[data-theme="dark"] .occupancy-subtitle i {
    color: #58a6ff;
}

[data-theme="dark"] .occupancy-item label {
    color: #b3b3b3;
}

[data-theme="dark"] .quantity-control label {
    color: #58a6ff;
}

[data-theme="dark"] .room-quantity-section {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(88, 166, 255, 0.05) 100%);
    border-color: rgba(88, 166, 255, 0.4);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.15);
}

/* Dark Theme Stepper Buttons */
[data-theme="dark"] .stepper-btn {
    background: linear-gradient(135deg, #2d3748 0%, #374151 100%);
    border-color: rgba(88, 166, 255, 0.4);
    color: #58a6ff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .stepper-btn:hover {
    background: linear-gradient(135deg, #374151 0%, #4a5568 100%);
    border-color: #58a6ff;
    color: #58a6ff;
    box-shadow: 0 4px 8px rgba(88, 166, 255, 0.2);
}

[data-theme="dark"] .stepper-btn:active {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2) 0%, rgba(88, 166, 255, 0.1) 100%);
    box-shadow: 0 2px 4px rgba(88, 166, 255, 0.3);
}

[data-theme="dark"] .stepper-input {
    background: linear-gradient(135deg, #2d3748 0%, #374151 100%);
    border-color: rgba(88, 166, 255, 0.4);
    color: #e0e0e0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .stepper-input:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

/* Dark Theme Room Quantity Specific */
[data-theme="dark"] .room-quantity-stepper .stepper-btn {
    background: linear-gradient(135deg, #2d3748 0%, #374151 100%);
    border-color: rgba(88, 166, 255, 0.5);
    color: #58a6ff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .room-quantity-stepper .stepper-btn:hover {
    background: linear-gradient(135deg, #374151 0%, #4a5568 100%);
    border-color: #58a6ff;
    box-shadow: 0 6px 12px rgba(88, 166, 255, 0.25);
}

[data-theme="dark"] .room-quantity-input {
    background: linear-gradient(135deg, #2d3748 0%, #374151 100%);
    border-color: rgba(88, 166, 255, 0.5);
    color: #58a6ff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .occupancy-controls.invalid-combination {
    border-color: #f56565;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(245, 101, 101, 0.05) 100%);
}

[data-theme="dark"] .occupancy-controls.invalid-combination::after {
    color: #f56565;
}

/* Responsive Design */
@media (max-width: 768px) {
    .occupancy-row {
        gap: 6px;
    }

    .occupancy-item {
        padding: 2px 0;
    }

    .occupancy-item label {
        font-size: 11px;
        min-width: 60px;
    }

    .quantity-control label {
        font-size: 10px;
    }

    .stepper-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .stepper-input {
        width: 32px;
        height: 22px;
        font-size: 11px;
    }

    .room-quantity-section {
        padding: 6px 8px;
    }

    .occupancy-controls {
        padding: 8px;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .occupancy-item label {
        font-size: 10px;
        min-width: 50px;
    }

    .quantity-control label {
        font-size: 9px;
    }

    .stepper-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .stepper-input {
        width: 28px;
        height: 20px;
        font-size: 10px;
    }
}

/* Animation for state changes */
.occupancy-controls,
.room-quantity-section {
    transition: all 0.3s ease;
}

.stepper-control {
    transition: opacity 0.2s ease;
}

/* Focus states for accessibility */
.stepper-btn:focus,
.stepper-input:focus {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

[data-theme="dark"] .stepper-btn:focus,
[data-theme="dark"] .stepper-input:focus {
    outline-color: #58a6ff;
}

/* Occupancy Subtitle */
.occupancy-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #0078d4;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.occupancy-subtitle i {
    font-size: 12px;
    color: #0078d4;
}

/* Room Quantity Enhancements - Make More Prominent */
.room-quantity-section {
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.1) 0%, rgba(0, 120, 212, 0.05) 100%);
    border: 1px solid rgba(0, 120, 212, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-right: 12px;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.15);
    backdrop-filter: blur(5px);
}

.room-quantity-stepper {
    gap: 6px;
}

.room-quantity-stepper .stepper-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border: 2px solid rgba(0, 120, 212, 0.4);
    background: linear-gradient(135deg, #fff 0%, #f0f8ff 100%);
    color: #0078d4;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0, 120, 212, 0.2);
}

.room-quantity-stepper .stepper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 120, 212, 0.25);
    border-color: #0078d4;
}

.room-quantity-input {
    width: 42px;
    height: 32px;
    font-size: 16px;
    font-weight: 800;
    border: 2px solid rgba(0, 120, 212, 0.4);
    background: linear-gradient(135deg, #fff 0%, #f0f8ff 100%);
    color: #0078d4;
    box-shadow: inset 0 2px 4px rgba(0, 120, 212, 0.1);
}

.quantity-control label {
    font-size: 12px;
    font-weight: 700;
    color: #0078d4;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

/* Hide redundant tax breakdown under package options */
.room-package-clean .tax-breakdown {
    display: none !important;
}

/* Booking Controls Layout */
.booking-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

/* Room Actions Layout */
.room-actions-clean {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.room-actions-clean .btn-gallery {
    flex-shrink: 0;
}

.room-actions-clean .btn-book {
    flex-shrink: 0;
}

/* Responsive adjustments */
/* Additional Mobile Optimizations for New Controls */
@media (max-width: 768px) {
    /* Compact occupancy controls */
    .occupancy-controls {
        margin-top: 8px;
        padding: 6px 8px;
    }

    .occupancy-subtitle {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .occupancy-subtitle i {
        font-size: 10px;
    }

    /* Compact room quantity section */
    .room-quantity-section {
        padding: 6px 8px;
        margin-right: 8px;
    }

    /* Compact action buttons */
    .booking-controls {
        gap: 6px;
    }

    .room-actions-clean {
        gap: 6px;
        margin-top: 8px;
    }

    .room-actions-clean .btn-gallery,
    .room-actions-clean .btn-book {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    /* Ultra-compact for small screens */
    .occupancy-controls {
        padding: 4px 6px;
        margin-top: 6px;
    }

    .occupancy-subtitle {
        font-size: 8px;
        margin-bottom: 3px;
    }

    .occupancy-item label {
        font-size: 8px;
        margin-bottom: 1px;
    }

    /* Stack booking controls vertically on very small screens */
    .booking-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .room-quantity-section {
        justify-content: center;
        margin-right: 0;
        padding: 4px 6px;
    }

    .room-actions-clean {
        flex-direction: column;
        gap: 4px;
        margin-top: 6px;
    }

    .room-actions-clean .btn-gallery,
    .room-actions-clean .btn-book {
        padding: 6px 10px;
        font-size: 11px;
        width: 100%;
    }

    /* Ensure room cards don't interfere with sticky pricing controls on mobile */
    .room-card-clean {
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
    }

    /* Adjust scroll-to-top button position when room controls are visible */
    .scroll-to-top {
        bottom: 5rem !important; /* Move higher to avoid room quantity controls */
        right: 1rem !important;
    }
}

/* Additional mobile optimizations for ultra-small screens */
@media (max-width: 360px) {
    .occupancy-controls {
        padding: 3px 5px;
        margin-top: 4px;
    }

    .occupancy-subtitle {
        font-size: 7px;
        margin-bottom: 2px;
    }

    .occupancy-item label {
        font-size: 7px;
    }

    .stepper-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .stepper-input {
        width: 24px;
        height: 20px;
        font-size: 9px;
    }

    .room-quantity-stepper .stepper-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .room-quantity-input {
        width: 30px;
        height: 24px;
        font-size: 12px;
    }
}