/* === LOGIN MODAL (Green Theme / Reference Design) === */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 32px;
    text-align: center;
}

.login-modal-overlay.active .login-modal {
    transform: scale(1);
}

.lm-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.lm-close-btn:hover {
    color: #4b5563;
}

.lm-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lm-logo-area {
    margin-bottom: 20px;
}

.lm-welcome {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.lm-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.lm-subtitle strong {
    color: #1f2937;
    font-weight: 700;
}

.lm-bg-spacer {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    margin-bottom: 24px;
}

/* Form Styles */
.lm-form-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

.lm-otp-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.lm-label {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    width: 100%;
    text-align: left;
}

.lm-input-container {
    width: 100%;
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    height: 48px;
    margin-bottom: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lm-input-container:focus-within {
    border-color: #1DBF73;
    box-shadow: 0 0 0 3px rgba(29, 191, 115, 0.1);
}

.lm-country-prefix {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid #d1d5db;
}

.lm-phone-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 16px;
    font-size: 15px;
    color: #1f2937;
    height: 100%;
}

.lm-get-otp-btn {
    width: 100%;
    background: #1DBF73;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(29, 191, 115, 0.2);
}

.lm-get-otp-btn:hover {
    background: #10b981;
}

.lm-terms {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    max-width: 90%;
}

.lm-terms a {
    color: #1DBF73;
    text-decoration: none;
    font-weight: 500;
}

/* OTP Specifics */
.lm-otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.otp-digit {
    width: 50px;
    height: 50px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    outline: none;
    transition: all 0.2s;
}

.otp-digit:focus {
    border-color: #1DBF73;
    box-shadow: 0 0 0 3px rgba(29, 191, 115, 0.1);
    transform: translateY(-2px);
}

.lm-timer-area {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lm-resend-btn {
    background: none;
    border: none;
    color: #1DBF73;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.lm-resend-btn:disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.lm-verify-btn {
    width: 100%;
    background: #1DBF73;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(29, 191, 115, 0.2);
}

.lm-verify-btn:hover {
    background: #10b981;
}

.lm-back-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

/* === MOBILE STYLES (Bottom Sheet) === */
@media (max-width: 768px) {
    .login-modal-overlay {
        align-items: flex-end;
    }

    .login-modal {
        border-radius: 20px 20px 0 0;
        padding: 32px 24px calc(40px + env(safe-area-inset-bottom));
        transform: translateY(100%);
        max-width: 100%;
        max-height: 90%;
        overflow-y: auto;
        margin: 0;
        transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .login-modal-overlay.active .login-modal {
        transform: translateY(0);
        scale: 1;
    }

    .lm-otp-inputs {
        gap: 8px;
        /* Tighter on mobile */
    }

    .otp-digit {
        width: 45px;
        height: 45px;
    }
}

/* === MOBILE FILTERS PANEL === */
#mobileFiltersPanel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 999;
    overflow: hidden;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    max-height: 400px;
}

#mobileFiltersPanel.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.filter-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.filter-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.filter-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.filter-content {
    padding: 16px 20px;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.price-range-container {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.price-input {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    text-align: center;
}

.price-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.price-separator {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
    padding: 0 4px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f9fafb;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #10b981;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.amenity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.amenity-tag {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    white-space: nowrap;
}

.amenity-tag:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.amenity-tag.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.filter-apply-btn {
    position: sticky;
    bottom: 0;
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 0 12px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.filter-apply-btn:hover {
    background: #059669;
}

.filter-apply-btn:active {
    transform: translateY(0);
}