/* Basic Reset & Fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f7f7f7;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #ff385c; /* Airbnb red */
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #717171;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

h2 {
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

h2 i {
    margin-right: 10px;
    color: #ff385c;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #222;
    font-weight: 500;
    display: flex;
    align-items: center;
}

h3 i {
    margin-right: 8px;
    color: #ff385c;
}

/* Card Container */
.card-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    min-width: 300px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.form-card {
    flex: 2;
    min-width: 500px;
}

.results-card {
    flex: 1;
    min-width: 300px;
    align-self: flex-start;
    position: sticky;
    top: 20px;
}

/* Form Styles */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
    min-width: 200px; /* Prevents fields from becoming too narrow */
}

.helper-text {
    font-size: 0.9rem;
    color: #717171;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #222;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #ff385c;
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.15);
}

/* Dropdown with search styles */
.select-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.search-input {
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: #ff385c;
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.15);
}

/* Amenities Styling */
.amenities-section {
    margin-bottom: 25px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

/* Clickable amenity box styles */
.amenity-box {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e4e4e4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.amenity-box:hover {
    background-color: #f0f0f0;
    border-color: #ddd;
    transform: translateY(-2px);
}

.amenity-box.active {
    background-color: #fff8f9;
    border-color: #ff385c;
}

.amenity-checkbox {
    width: auto !important;
    margin-right: 10px;
    cursor: pointer;
}

.amenity-label {
    margin-bottom: 0 !important;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
    font-size: 0.9rem;
}

/* Button Styles */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: #ff385c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.2s, transform 0.2s;
    font-family: 'Poppins', sans-serif;
}

.submit-btn i {
    margin-right: 10px;
}

.submit-btn:hover {
    background: #e31c5f;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Results Styles */
#results {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.result-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-icon {
    font-size: 1.8rem;
    color: #ff385c;
    margin-bottom: 10px;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ff385c;
    margin: 10px 0;
}

.result-label {
    color: #717171;
    font-size: 0.9rem;
}

.property-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.property-details i {
    color: #ff385c;
    margin-right: 8px;
}

/* Loading and Message Indicators */
.loading-indicator, .message-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 56, 92, 0.2);
    border-top: 4px solid #ff385c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text, .message-text {
    color: #ff385c;
    font-weight: 500;
}

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

/* Error Styles */
#error {
    margin: 20px auto;
    padding: 15px;
    background-color: #fff1f1;
    color: #e31c5f;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #e31c5f;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#error p {
    margin: 0;
}

#error.hidden {
    display: none;
    opacity: 0;
}

#results.hidden {
    display: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: #717171;
    font-size: 0.9rem;
    margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .card-container {
        flex-direction: column;
    }
    
    .form-card, .results-card {
        min-width: 100%;
    }
    
    .results-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}