/*
Theme Name: Real Estate Material App Theme
Theme URI: https://hypercognito.com/
Author: Hypercognito Computings
Description: An Android Material Design 3 companion theme for the WP Real Estate & Town Listing Manager plugin.
Version: 1.0.0
Text Domain: re-material-theme
*/

:root {
    /* Material 3 Light Color Palette */
    --md-sys-color-primary: #006838;         /* Deep WhatsApp / App Green */
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #b8f5cb;
    --md-sys-color-surface: #fdfdfd;
    --md-sys-color-surface-container: #f3f4f6;
    --md-sys-color-on-surface: #1a1c1e;
    --md-sys-color-outline: #727972;
    --md-sys-color-error: #ba1a1a;
    
    /* Elevations & Radii */
    --md-shape-corner-small: 8px;
    --md-shape-corner-medium: 16px;
    --md-shape-corner-large: 28px;
    --md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
    --md-elevation-2: 0px 4px 8px 3px rgba(0, 0, 0, 0.15), 0px 1px 3px 0px rgba(0, 0, 0, 0.30);
}

body {
    margin: 0;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background-color: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    -webkit-font-smoothing: antialiased;
}

/* Material 3 App Bar (TopAppBar) */
.md-top-app-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--md-elevation-1);
}

.md-app-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    text-decoration: none;
    color: inherit;
}

/* Material Cards */
.md-card {
    background-color: var(--md-sys-color-surface);
    border-radius: var(--md-shape-corner-medium);
    box-shadow: var(--md-elevation-1);
    overflow: hidden;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.md-card:hover {
    box-shadow: var(--md-elevation-2);
}

/* Material Floating Action Button (FAB) / WhatsApp CTA */
.md-fab-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #25d366; /* WhatsApp Brand Green */
    color: #ffffff;
    border-radius: var(--md-shape-corner-large);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: var(--md-elevation-2);
    font-weight: 500;
    z-index: 999;
}

.md-fab-whatsapp:hover {
    background-color: #22bf5b;
    color: #ffffff;
}


/* --- Shortcode Town Grid Styles --- */
.re-town-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.re-town-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface, #1f2937);
    text-align: center;
    border-radius: var(--md-shape-corner-medium, 16px);
    background: var(--md-sys-color-surface, #ffffff);
    box-shadow: var(--md-elevation-1);
    border: 1px solid var(--md-sys-color-outline, #e5e7eb);
}
.re-town-card .material-symbols-outlined {
    font-size: 28px;
    color: var(--md-sys-color-primary, #006838);
    margin-bottom: 8px;
}
.re-town-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.re-town-count {
    font-size: 11px;
    color: #4b5563;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 100px;
}

/* --- Shortcode Search Form Styles --- */
.re-search-wrapper {
    padding: 20px;
    margin-bottom: 24px;
}
.re-search-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.re-form-group {
    display: flex;
    flex-direction: column;
}
.re-form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}
.re-form-group input,
.re-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--md-sys-color-outline, #d1d5db);
    border-radius: var(--md-shape-corner-small, 8px);
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}
.re-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.re-form-row .re-form-group {
    flex: 1;
    min-width: 140px;
}
.re-search-btn {
    background-color: var(--md-sys-color-primary, #006838);
    color: var(--md-sys-color-on-primary, #ffffff);
    border: none;
    padding: 14px;
    border-radius: var(--md-shape-corner-medium, 12px);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

/* --- Shortcode Listing Grid Styles --- */
.re-listing-stream {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
}
.re-property-card {
    margin-bottom: 0 !important;
    overflow: hidden;
}
.re-card-thumb {
    display: block;
    height: 180px;
    overflow: hidden;
    position: relative;
}
.re-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.re-badge-offer {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}
.re-card-body {
    padding: 16px;
}
.re-card-town {
    font-size: 12px;
    font-weight: 500;
    color: var(--md-sys-color-primary, #006838);
    display: block;
    margin-bottom: 4px;
}
.re-card-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px 0;
}
.re-card-title a {
    color: inherit;
    text-decoration: none;
}
.re-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--md-sys-color-primary, #006838);
    margin-bottom: 12px;
}
.re-card-actions {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--md-sys-color-surface-container, #f3f4f6);
    padding-top: 12px;
    margin-top: 8px;
}
.re-btn-details {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--md-sys-color-surface-container, #f3f4f6);
    border-radius: var(--md-shape-corner-small, 8px);
    text-decoration: none;
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
}
.re-btn-whatsapp {
    background: #25d366;
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--md-shape-corner-small, 8px);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}