/* =============================================================
   Legacy Homes Properties — Frontend Styles  v3.0.0
   ============================================================= */

/* ---- BASE WRAPPER ---- */
.legacy-wrapper {
    width: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 10px 0;
    color: #111;
}

/* ---- SHARE YOUR LISTING BUTTON BAR ---- */
.legacy-submit-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0 4px 12px;
}

.legacy-submit-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0a1f44;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.2px;
    line-height: 1;
}
.legacy-submit-trigger:hover {
    background: #122b5e;
    transform: translateY(-1px);
}
.legacy-submit-trigger svg {
    flex-shrink: 0;
    fill: #c9960c;
    width: 12px;
    height: 12px;
}

/* ---- TOGGLE TABS ---- */
.legacy-toggle-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 6px 0 14px;
    margin-bottom: 8px;
    scrollbar-width: none;
}
.legacy-toggle-row::-webkit-scrollbar { display: none; }

.legacy-toggle-btn {
    border: 1.5px solid #c9960c;
    background: #fff;
    padding: 7px 12px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #0a1f44;
    letter-spacing: 0.1px;
}
.legacy-toggle-btn:hover {
    background: #fdf6e3;
    border-color: #a87c09;
}
.legacy-toggle-btn.active {
    background: #0a1f44;
    color: #fff;
    border-color: #0a1f44;
    box-shadow: 0 3px 8px rgba(10, 31, 68, 0.25);
}

/* ---- PROPERTY ROW ---- */
.legacy-property-row {
    display: none;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.legacy-property-row.active { display: flex; }
.legacy-property-row::-webkit-scrollbar { display: none; }

/* ---- CARD ---- */
.legacy-card {
    width: 180px;
    min-width: 180px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 18px;
    transition: transform 0.3s ease;
}
.legacy-card:hover {
    transform: translateY(-4px);
}

/* ---- IMAGE WRAP ---- */
.legacy-image-wrap {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
}
.legacy-image-wrap img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.legacy-card:hover .legacy-image-wrap img {
    transform: scale(1.05);
}

/* ---- LIKE BUTTON — image overlay (top-right) ---- */
.legacy-like {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.15s ease, background 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.legacy-like:hover,
.legacy-like:active {
    background: #fff0f3;
    transform: scale(1.08);
}
.legacy-like:focus {
    outline: 2px solid #ff385c;
    outline-offset: 2px;
}

/* SVG heart default (unfilled) */
.lh-heart-svg {
    fill: none;
    stroke: #aaa;
    stroke-width: 2;
    transition: fill 0.2s ease, stroke 0.2s ease;
    flex-shrink: 0;
    display: block;
}

/* SVG heart liked state */
.legacy-like.liked .lh-heart-svg {
    fill: #ff385c;
    stroke: #ff385c;
}

.like-count {
    color: #333;
    font-size: 10px;
    font-weight: 700;
    min-width: 10px;
    text-align: center;
    line-height: 1;
}
.legacy-like.liked .like-count {
    color: #ff385c;
}

/* ---- CARD CONTENT ---- */
.legacy-content { padding: 10px 4px 4px; }
.legacy-location { font-size: 10px; font-weight: 600; color: #717171; margin-bottom: 3px; }
.legacy-content h3 {
    margin: 0 0 3px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.legacy-title-link {
    color: #111;
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.legacy-title-link:hover {
    color: #0a1f44;
    border-bottom-color: #0a1f44;
}
.legacy-meta { font-size: 12px; color: #222; font-weight: 600; margin-top: 2px; }
.legacy-rating { font-size: 11px; font-weight: 600; color: #111; margin-top: 3px; }

/* ---- AGENT BIO ---- */
.legacy-bio {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-style: italic;
}

/* ---- AGENT ROW ---- */
.legacy-agent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.legacy-agent { display: flex; align-items: center; gap: 7px; }

.legacy-avatar {
    position: relative;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
.legacy-avatar img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.legacy-avatar.has-profile { cursor: pointer; }
.legacy-avatar.has-profile img { transition: opacity 0.2s ease; }
.legacy-avatar.has-profile:hover img { opacity: 0.8; }

.legacy-verified {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #1d9bf0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    font-weight: 700;
    border: 1.5px solid #fff;
}

.legacy-agent-name {
    font-size: 10px;
    font-weight: 600;
    max-width: 80px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #444;
}

.legacy-wa-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.legacy-wa-btn:hover { transform: scale(1.1); }
.legacy-wa-btn img { width: 14px; height: 14px; display: block; }

/* ---- IMAGE ZOOM OVERLAY ---- */
.legacy-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    cursor: zoom-out;
    padding: 20px;
}
.legacy-zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    animation: lh-zoom-in 0.25s ease;
}
@keyframes lh-zoom-in {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* =============================================================
   FRONTEND SUBMISSION FORM OVERLAY
   ============================================================= */

.lh-form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.lh-form-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 28px 24px 24px;
    position: relative;
    animation: lh-pop-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

@keyframes lh-pop-in {
    from { transform: scale(0.85) translateY(20px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.lh-form-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}
.lh-form-close:hover { color: #333; }

.lh-progress-wrap {
    height: 4px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}
.lh-progress-bar {
    height: 100%;
    background: #0a1f44;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}
.lh-step-label {
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 6px;
}

.lh-form-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0 0 22px;
}

.lh-step { display: none; }
.lh-step.active { display: block; }

.lh-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
    line-height: 1.4;
}
.lh-label-sm {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-top: 16px;
    margin-bottom: 8px;
}

.lh-input,
.lh-textarea,
.lh-select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    color: #111;
    background: #fafafa;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.lh-input:focus,
.lh-textarea:focus,
.lh-select:focus {
    border-color: #0a1f44;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.07);
}
.lh-textarea {
    height: 110px;
    resize: vertical;
    line-height: 1.5;
}
.lh-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.lh-choice-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.lh-choice-btn {
    flex: 1;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
    line-height: 1.3;
}
.lh-choice-btn:hover {
    border-color: #c9960c;
    background: #fdf6e3;
}
.lh-choice-btn.selected {
    border-color: #0a1f44;
    background: #0a1f44;
    color: #fff;
}
.lh-choice-icon { font-size: 28px; line-height: 1; }

.lh-error {
    font-size: 12px;
    color: #e53e3e;
    margin: 6px 0 0;
    min-height: 16px;
    font-weight: 500;
}

.lh-upload-area {
    border: 2px dashed #ddd;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    background: #fafafa;
    min-height: 80px;
}
.lh-upload-area:hover {
    border-color: #aaa;
    background: #f5f5f5;
}
.lh-upload-area input[type="file"] { display: none; }
.lh-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    color: #aaa;
    pointer-events: none;
}
.lh-upload-placeholder p { margin: 0; font-size: 14px; font-weight: 600; color: #666; }
.lh-upload-placeholder span { font-size: 11px; color: #bbb; }

.lh-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.lh-photo-thumb {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e0e0e0;
    flex-shrink: 0;
}
.lh-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lh-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lh-upload-status {
    font-size: 12px;
    color: #555;
    margin: 6px 0 0;
    min-height: 16px;
    font-weight: 500;
}

.lh-form-nav {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    align-items: center;
}

.lh-btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0a1f44;
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}
.lh-btn-primary:hover:not(:disabled) {
    background: #122b5e;
    transform: translateY(-1px);
}
.lh-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.lh-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: #555;
    border: 1.5px solid #ddd;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}
.lh-btn-secondary:hover {
    border-color: #aaa;
    color: #111;
}

.lh-btn-submit { background: #1a7f3c; }
.lh-btn-submit:hover:not(:disabled) { background: #156b32; }

.lh-success {
    text-align: center;
    padding: 10px 0 4px;
}
.lh-success-icon { font-size: 52px; line-height: 1; margin-bottom: 14px; }
.lh-success h3 { font-size: 22px; font-weight: 800; color: #111; margin: 0 0 10px; }
.lh-success p { font-size: 15px; color: #555; line-height: 1.6; margin: 0 0 22px; }
.lh-success .lh-btn-primary { display: block; width: 100%; }

/* ---- CARD TITLE STATES ---- */
/* Anchor: PHP found a matching WordPress post */
.lh-title-anchor {
    color: #0a1f44;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #c9960c;
    font-weight: 700;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.lh-title-anchor:hover {
    color: #c9960c;
    text-decoration-color: #0a1f44;
}

/* Plain span: no matching post yet — JS will search on click */
.lh-title-plain {
    color: #111;
    cursor: pointer;
    transition: color 0.15s ease;
}
.lh-title-plain:hover {
    color: #0a1f44;
}

/* ---- FORM HINT TEXT ---- */
.lh-hint-text {
    font-size: 11px;
    color: #999;
    margin: 5px 0 0;
    line-height: 1.4;
}
