/**
 * Beemo Frontend Styles
 * Theme: Abeilles (Bees) - #FFBD52 (primary), #131111 (secondary), #ECECEC (background)
 * Font: Inter from Google Fonts
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --beemo-primary: #FFBD52;
    --beemo-secondary: #131111;
    --beemo-background: #ECECEC;
    --beemo-white: #ffffff;
    --beemo-border: #e0e0e0;
    --beemo-text: #333333;
    --beemo-text-light: #666666;
    --beemo-success: #10b981;
    --beemo-error: #ef4444;
    --beemo-warning: #f59e0b;
    --beemo-info: #3b82f6;
}

/* Base Styles */
.beemo-search-form,
.beemo-properties-grid,
.beemo-property-card,
.beemo-contact-form,
.beemo-eco-calculator {
    font-family: 'Inter', sans-serif;
    color: var(--beemo-text);
    box-sizing: border-box;
}

.beemo-search-form *,
.beemo-properties-grid *,
.beemo-property-card *,
.beemo-contact-form *,
.beemo-eco-calculator * {
    box-sizing: border-box;
}

/* Search Form */
.beemo-search-form {
    background: var(--beemo-white);
    border: 1px solid var(--beemo-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.beemo-search-main {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.beemo-search-input-group,
.beemo-search-location,
.beemo-search-type {
    position: relative;
}

.beemo-search-form input,
.beemo-search-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--beemo-border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: var(--beemo-white);
    transition: border-color 0.2s ease;
}

.beemo-search-form input:focus,
.beemo-search-form select:focus {
    outline: none;
    border-color: var(--beemo-primary);
    box-shadow: 0 0 0 3px rgba(255, 189, 82, 0.1);
}

.beemo-search-submit {
    padding: 12px 24px;
    background: var(--beemo-primary);
    color: var(--beemo-secondary);
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.beemo-search-submit:hover {
    background: #e0a647;
}

/* Search Suggestions */
.beemo-search-suggestions,
.beemo-location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--beemo-white);
    border: 1px solid var(--beemo-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.beemo-suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--beemo-border);
    font-size: 14px;
}

.beemo-suggestion-item:last-child {
    border-bottom: none;
}

.beemo-suggestion-item:hover {
    background: var(--beemo-background);
}

/* Advanced Filters */
.beemo-search-filters {
    border-top: 1px solid var(--beemo-border);
    padding-top: 16px;
}

.beemo-filters-toggle button {
    background: none;
    border: none;
    color: var(--beemo-primary);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.beemo-filters-content {
    margin-top: 16px;
}

.beemo-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.beemo-filter-group label {
    display: block;
    font-weight: 500;
    color: var(--beemo-secondary);
    margin-bottom: 6px;
    font-size: 14px;
}

.beemo-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.beemo-range-inputs input {
    flex: 1;
}

.beemo-range-inputs span {
    color: var(--beemo-text-light);
    font-weight: 500;
}

.beemo-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.beemo-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.beemo-filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Results */
.beemo-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--beemo-border);
}

.beemo-results-count {
    font-weight: 500;
    color: var(--beemo-text);
}

.beemo-results-sort select {
    padding: 8px 12px;
    border: 1px solid var(--beemo-border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    background: var(--beemo-white);
}

.beemo-results-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.beemo-results-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Map */
.beemo-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--beemo-border);
}

/* Properties Grid */
.beemo-properties-grid {
    margin-bottom: 24px;
}

.beemo-properties-list {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

.beemo-grid-columns-1 .beemo-properties-list { grid-template-columns: 1fr; }
.beemo-grid-columns-2 .beemo-properties-list { grid-template-columns: repeat(2, 1fr); }
.beemo-grid-columns-3 .beemo-properties-list { grid-template-columns: repeat(3, 1fr); }
.beemo-grid-columns-4 .beemo-properties-list { grid-template-columns: repeat(4, 1fr); }

/* Property Card */
.beemo-property-card {
    background: var(--beemo-white);
    border: 1px solid var(--beemo-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.beemo-property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.beemo-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.beemo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.beemo-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--beemo-background);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--beemo-text-light);
    font-size: 14px;
}

.beemo-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.beemo-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    background: var(--beemo-white);
    color: var(--beemo-text);
}

.beemo-badge-location {
    background: var(--beemo-info);
    color: var(--beemo-white);
}

.beemo-badge-eco {
    background: var(--beemo-success);
    color: var(--beemo-white);
}

.beemo-card-content {
    padding: 20px;
}

.beemo-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--beemo-secondary);
}

.beemo-card-title a {
    color: inherit;
    text-decoration: none;
}

.beemo-card-title a:hover {
    color: var(--beemo-primary);
}

.beemo-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--beemo-text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

.beemo-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--beemo-primary);
    margin-bottom: 16px;
}

.beemo-price-period {
    font-size: 14px;
    font-weight: 500;
    color: var(--beemo-text-light);
}

.beemo-card-details {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--beemo-text);
}

.beemo-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

.beemo-card-description {
    font-size: 14px;
    color: var(--beemo-text-light);
    line-height: 1.5;
    margin-bottom: 16px;
}

.beemo-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.beemo-feature-tag {
    padding: 3px 8px;
    background: var(--beemo-background);
    color: var(--beemo-text);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.beemo-card-eco-labels {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.beemo-eco-label {
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--beemo-white);
}

.beemo-label-bbc { background: #10b981; }
.beemo-label-hqe { background: #3b82f6; }
.beemo-label-effinergie { background: #8b5cf6; }

.beemo-card-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--beemo-border);
    background: var(--beemo-background);
}

/* Buttons */
.beemo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.beemo-btn-primary {
    background: var(--beemo-primary);
    color: var(--beemo-secondary);
    border-color: var(--beemo-primary);
}

.beemo-btn-primary:hover {
    background: #e0a647;
    border-color: #e0a647;
    color: var(--beemo-secondary);
    text-decoration: none;
}

.beemo-btn-secondary {
    background: var(--beemo-white);
    color: var(--beemo-text);
    border-color: var(--beemo-border);
}

.beemo-btn-secondary:hover {
    background: var(--beemo-background);
    color: var(--beemo-text);
    text-decoration: none;
}

/* Contact Form */
.beemo-contact-form {
    background: var(--beemo-white);
    border: 1px solid var(--beemo-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.beemo-form-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--beemo-secondary);
}

.beemo-form-group {
    margin-bottom: 16px;
}

.beemo-form-group label {
    display: block;
    font-weight: 500;
    color: var(--beemo-secondary);
    margin-bottom: 6px;
    font-size: 14px;
}

.beemo-contact-form input,
.beemo-contact-form textarea,
.beemo-contact-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--beemo-border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: var(--beemo-white);
    transition: border-color 0.2s ease;
}

.beemo-contact-form input:focus,
.beemo-contact-form textarea:focus,
.beemo-contact-form select:focus {
    outline: none;
    border-color: var(--beemo-primary);
    box-shadow: 0 0 0 3px rgba(255, 189, 82, 0.1);
}

.beemo-contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.beemo-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.beemo-form-consent input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.beemo-form-actions {
    margin-top: 20px;
}

.beemo-form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.beemo-form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.beemo-form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Eco Calculator */
.beemo-eco-calculator {
    background: var(--beemo-white);
    border: 1px solid var(--beemo-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.beemo-calculator-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--beemo-secondary);
}

.beemo-calculator-result {
    margin-top: 20px;
    padding: 20px;
    background: var(--beemo-background);
    border-radius: 6px;
    text-align: center;
}

.beemo-result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--beemo-primary);
    margin-bottom: 8px;
}

.beemo-carbon-unit {
    font-size: 16px;
    color: var(--beemo-text-light);
    font-weight: 500;
}

.beemo-result-explanation {
    margin-top: 12px;
    font-size: 14px;
    color: var(--beemo-text-light);
}

/* DPE Badges */
.beemo-dpe-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.beemo-dpe-a { background: #319795; }
.beemo-dpe-b { background: #38a169; }
.beemo-dpe-c { background: #68d391; color: #1a202c; }
.beemo-dpe-d { background: #f6e05e; color: #1a202c; }
.beemo-dpe-e { background: #ed8936; }
.beemo-dpe-f { background: #e53e3e; }
.beemo-dpe-g { background: #9c4221; }

/* Loading */
.beemo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--beemo-text-light);
}

.beemo-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--beemo-border);
    border-radius: 50%;
    border-top-color: var(--beemo-primary);
    animation: beemo-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes beemo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Results */
.beemo-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--beemo-text-light);
}

/* Pagination */
.beemo-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.beemo-pagination a,
.beemo-pagination span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--beemo-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--beemo-text);
    font-size: 14px;
    font-weight: 500;
}

.beemo-pagination a:hover {
    background: var(--beemo-primary);
    color: var(--beemo-secondary);
    border-color: var(--beemo-primary);
}

.beemo-pagination .current {
    background: var(--beemo-primary);
    color: var(--beemo-secondary);
    border-color: var(--beemo-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .beemo-search-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .beemo-filter-row {
        grid-template-columns: 1fr;
    }
    
    .beemo-results-layout {
        grid-template-columns: 1fr;
    }
    
    .beemo-properties-list {
        grid-template-columns: 1fr !important;
    }
    
    .beemo-card-details {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .beemo-card-actions {
        flex-direction: column;
    }
    
    .beemo-results-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
}

@media (max-width: 1024px) {
    .beemo-grid-columns-4 .beemo-properties-list { grid-template-columns: repeat(3, 1fr); }
    .beemo-grid-columns-3 .beemo-properties-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .beemo-grid-columns-3 .beemo-properties-list,
    .beemo-grid-columns-2 .beemo-properties-list { grid-template-columns: 1fr; }
}
