/* --- COMPONENT STYLES --- */

/* Address Heading */
.nine10-mls-comp-content.type-address_heading h1 {
    margin: 0;
    line-height: 1.2;
}

/* Price & Mortgage */
.mls-price-block {
    position: relative;
}
.mls-price-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.mls-price-amount {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
    margin: 0;
}
.mls-mortgage-toggle {
    background: none;
    border: none;
    color: #0073aa;
    font-size: 1em;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 4px;
}
.mls-mortgage-toggle:hover {
    background: rgba(0, 115, 170, 0.1);
    color: #005177;
}
.mls-mortgage-toggle .mls-calc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mls-mortgage-toggle .mls-calc-icon i {
    font-size: 1.2em;
}
.mls-mortgage-toggle .mls-calc-icon svg {
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
}
.mls-mortgage-toggle .mls-monthly-payment {
    font-weight: 500;
}
.mls-mortgage-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 10px;
}

/* Mortgage Calculator Form */
.mls-mortgage-calc {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}
.mls-mortgage-calc h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #333;
}
.mls-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}
.mls-calc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mls-calc-field label {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
}
.mls-calc-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}
.mls-calc-field input:focus {
    outline: none;
    border-color: #0073aa;
}
.mls-mortgage-calc #mc-calculate {
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.mls-mortgage-calc #mc-calculate:hover {
    background: #005177;
}
.mls-mortgage-calc #mc-result {
    margin-top: 15px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 4px;
    text-align: center;
    font-size: 1.1em;
    color: #0073aa;
}
.mls-mortgage-calc #mc-result:empty {
    display: none;
}

/* Responsive for calculator */
@media (max-width: 480px) {
    .mls-calc-grid {
        grid-template-columns: 1fr;
    }
    .mls-price-row {
        gap: 10px;
    }
    .mls-price-amount {
        font-size: 2em;
    }
}


/* Meta Grid 3x3 */
.mls-meta-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #eee; /* Grid lines color */
    border: 1px solid #eee;
}
.mls-meta-grid-3x3 > div {
    background: #fff;
    padding: 15px;
    text-align: center;
    font-size: 0.9em;
}
.mls-meta-grid-3x3 strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
    text-transform: uppercase;
    font-size: 0.85em;
}

/* Info Boxes */
.mls-info-box {
    border: 1px solid #e0e0e0;
    margin-bottom: 25px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    background-color: #fff;
}
.mls-info-title {
    background: #333; 
    color: #fff;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #333;
}
.mls-info-content {
    padding: 0;
    margin: 0;
}
.mls-info-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    margin: 0;
    border: none;
}
.mls-info-content tr {
    border-bottom: 1px solid #eee;
}
.mls-info-content tr:last-child {
    border-bottom: none;
}
.mls-info-content tr:nth-child(even) {
    background-color: #f9f9f9; 
}
.mls-info-content th {
    width: 35%;
    padding: 12px 20px;
    color: #555;
    font-weight: 600;
    text-align: left;
    vertical-align: top;
    border-right: 1px solid #eee; 
    background: transparent;
}
.mls-info-content td {
    padding: 12px 20px;
    color: #333;
    text-align: left;
    vertical-align: top;
}

/* Agent Box */
.mls-agent-box {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #eee;
}
.agent-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.agent-details h4 {
    margin: 0 0 5px;
}
.agent-title {
    margin: 0 0 10px;
    font-size: 0.9em;
    color: #777;
    text-transform: uppercase;
}
.agent-details a {
    text-decoration: none;
    color: #0073aa;
    display: block;
    margin-bottom: 3px;
}

/* Action Buttons */
.mls-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.mls-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    text-align: center;
    transition: opacity 0.2s;
    min-width: 60px;
    /* Flex to align icon/text */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
/* Ensure Icons Inherit Text Color */
.mls-btn i, 
.mls-btn svg {
    color: inherit;
    fill: currentColor;
    font-size: 1.1em;
}

.request-showing-btn { background: #0073aa; }
.print-btn { background: #555; }
.mls-btn:hover { opacity: 0.9; }

/* FAV BUTTON - Standalone */
.mls-fav-btn { 
    position: relative; 
    top: auto;
    right: auto;
    width: auto;
    height: auto;
    border-radius: 4px; 
    background: #0073aa; 
    color: #fff;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    min-width: 200px;
}
.mls-fav-btn:hover { background: #005177; color: white; }
.mls-fav-btn.active { background: #e74c3c; color: white; }
.mls-fav-btn i, .mls-fav-btn svg { 
    font-size: 1.1em; 
    color: inherit; 
    fill: currentColor;
}

/* Sync Gallery */
.mls-gallery-sync-wrapper { position: relative; width: 100%; }
.mls-gallery-featured-carousel { 
    display: flex; 
    overflow-x: auto; 
    overflow-y: hidden;
    scroll-snap-type: x mandatory; 
    scrollbar-width: none; 
    margin-bottom: 10px; 
    scroll-behavior: smooth; 
    height: 450px; 
    position: relative; 
    background-color: #2a2a2a;
    border-radius: 4px;
}
.mls-gallery-featured-carousel::-webkit-scrollbar { display: none; }
.mls-sync-slide { 
    min-width: 100%; 
    scroll-snap-align: start; 
    height: 100%; 
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: center;
}
.mls-sync-slide img { 
    max-width: 100%; 
    max-height: 100%; 
    width: auto;
    height: auto;
    object-fit: contain; 
    display: block; 
}


/* THUMBNAIL STYLING FIX - Border on Image */
.mls-gallery-thumb-carousel { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
 .  overflow-y: hidden;
    padding: 3px 0 8px 0;
    scrollbar-width: thin; 
}
.mls-sync-thumb { 
    min-width: 100px; 
    width: 100px; 
    height: 70px; 
    cursor: pointer; 
    flex-shrink: 0; 
    padding: 0;
    border: none;
    box-sizing: border-box; 
}
.mls-sync-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 2px; 
    display: block; 
    box-sizing: border-box; 
    border: 3px solid transparent; 
    transition: border-color 0.2s;
}
.mls-sync-thumb.active img { 
    border: 3px solid #0073aa !important; /* Default, overridden by inline styles from widget */
}

.mls-gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: background 0.3s; top: 225px; }
.mls-gallery-nav.prev { left: 10px; }
.mls-gallery-nav.next { right: 10px; }
.mls-gallery-nav:hover { background: rgba(0,0,0,0.8); }

/* --- TABBED GALLERY --- */
.mls-tabbed-gallery-wrapper { width: 100%; }
.mls-gallery-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}
.mls-gallery-tab {
    background: #f5f5f5;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.mls-gallery-tab:hover {
    background: #e8e8e8;
    color: #333;
}
.mls-gallery-tab.active {
    background: #2a2a2a;
    color: #fff;
}
.mls-gallery-tab i,
.mls-gallery-tab svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
/* External link icon on Feature Sheet tab */
.mls-tab-external-icon {
    font-size: 0.75em !important;
    width: auto !important;
    height: auto !important;
    opacity: 0.7;
    margin-left: 2px;
}
.mls-gallery-tab-content {
    display: none;
}
.mls-gallery-tab-content.active {
    display: block;
}
.mls-tabbed-map {
    width: 100%;
    height: 450px;
    background: #eee;
    border-radius: 4px;
}
.mls-tabbed-vt-embed {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    background: #2a2a2a;
}
.mls-tabbed-vt-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Walk Score Container */
.mls-walk-score-wrapper { margin-bottom: 20px; border: 1px solid #eee; border-radius: 4px; width: 100%; display: block; }

/* Lightbox */
#mls-lightbox-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 99999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
#mls-lightbox-modal.active { opacity: 1; pointer-events: auto; }
.mls-lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; }
.mls-lightbox-content img { max-width: 100%; max-height: 90vh; box-shadow: 0 0 25px rgba(0,0,0,0.5); border-radius: 4px; }
.mls-lb-close, .mls-lb-prev, .mls-lb-next { position: absolute; color: white; background: rgba(0,0,0,0.5); border: none; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; line-height: 1; }
.mls-lb-close:hover, .mls-lb-prev:hover, .mls-lb-next:hover { background: rgba(255,255,255,0.3); }
.mls-lb-close { top: -50px; right: 0; }
.mls-lb-prev { top: 50%; left: -60px; transform: translateY(-50%); }
.mls-lb-next { top: 50%; right: -60px; transform: translateY(-50%); }
@media (max-width: 768px) { .mls-lb-prev { left: 10px; } .mls-lb-next { right: 10px; } .mls-lb-close { top: 10px; right: 10px; } }

/* --- FORM VISIBILITY FIX --- */
#mls-request-form-container .gform_wrapper { margin-top: 20px; padding: 20px; border: 1px solid #eee; border-radius: 4px; background: #f9f9f9; }
#mls-request-form-container .gform_wrapper .gform_fields { padding: 0; margin: 0; row-gap: 15px !important; }
#mls-request-form-container .gform_wrapper .gfield { margin: 0 !important; padding: 0 !important; }
#mls-request-form-container .gform_wrapper .gfield_label { display: block !important; visibility: visible !important; margin-bottom: 5px !important; padding: 0 !important; font-weight: 600; }
#mls-request-form-container .gform_wrapper .ginput_container { margin: 0 !important; padding: 0 !important; }
#mls-request-form-container .gform_wrapper input:not([type=submit]):not([type=checkbox]):not([type=radio]), 
#mls-request-form-container .gform_wrapper textarea, 
#mls-request-form-container .gform_wrapper select { padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; width: 100%; margin: 0 !important; }
#mls-request-form-container .gform_wrapper .gform_footer { margin-top: 15px !important; padding: 0 !important; }
#mls-request-form-container .gform_button { width: 100%; padding: 12px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; transition: background 0.2s; }

/* --- AI SEARCH NO RESULTS & SUGGESTIONS --- */
.mls-no-results-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}
.mls-no-results-container .no-results {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}
.mls-no-results-container .no-results i {
    margin-right: 8px;
    color: #999;
}
.mls-ai-suggestions {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 1px solid #e0e6ff;
    border-radius: 12px;
    padding: 25px;
    max-width: 600px;
    margin: 0 auto;
}
.mls-ai-suggestions h4 {
    margin: 0 0 20px 0;
    color: #444;
    font-size: 1.1em;
    font-weight: 600;
}
.mls-ai-suggestions h4 i {
    color: #f5a623;
    margin-right: 8px;
}
.mls-suggestion-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mls-suggestion-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}
.mls-suggestion-btn:hover {
    border-color: #0073aa;
    background: #f8fcff;
    transform: translateX(5px);
}
.mls-suggestion-btn .suggestion-text {
    font-size: 1em;
    color: #333;
    font-weight: 500;
}
.mls-suggestion-btn .suggestion-reason {
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}
.mls-suggestion-btn:hover .suggestion-text {
    color: #0073aa;
}

/* --- VIRTUAL TOUR COMPONENT --- */
.mls-vt-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}
.mls-vt-button-wrap {
    text-align: center;
}
.mls-vt-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(110, 142, 251, 0.3);
    transition: all 0.3s ease;
}
.mls-vt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 142, 251, 0.4);
    color: #fff;
}
.mls-vt-button i {
    font-size: 1.2em;
}
.mls-vt-embed {
    background: #f5f5f5;
}
.mls-vt-placeholder {
    border: 2px dashed #ddd;
}
