/*
 * left-panel.css — Left Panel Section Styles
 * Created: Batch 10 — Left Panel Wiring
 *
 * Covers section body styles for:
 *   Comps, Map, Photos, Notes
 *
 * NOTE: Expand/collapse animation (.lf-panel-card--open) is already
 * defined in css/right-panel.css and applies globally.
 *
 * Depends on: css/base.css, css/right-panel.css
 * Zero hardcoded colors — CSS vars only.
 */

/* ============================================================
   SHARED LEFT PANEL BODY PADDING
   ============================================================ */
.lf-lp-body {
    padding: var(--space-inner-sm) var(--space-inner-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================
   SECTION 1 — COMPS
   ============================================================ */

/* Header badge — comp count */
.lf-lp-comp-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--cyan-alpha-20);
    border: 1px solid var(--cyan-alpha-30);
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: var(--weight-bold);
    color: var(--cyan-500);
    margin-left: 6px;
    transition: background 0.18s ease;
}

/* Comp rows container */
.lf-comp-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Single comp row */
.lf-lp-comp-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    position: relative;
    transition: border-color 0.18s ease;
}

.lf-lp-comp-row:hover {
    border-color: var(--cyan-alpha-20);
}

/* Row top: index + remove button */
.lf-lp-comp-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.lf-lp-comp-row-num {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: var(--weight-bold);
    color: var(--text-dim);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
}

.lf-lp-comp-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: color 0.15s ease, background 0.15s ease;
    padding: 0;
    font-size: 10px;
}

.lf-lp-comp-remove:hover {
    color: var(--color-negative);
    background: var(--color-negative-bg);
}

/* Comp input fields */
.lf-lp-comp-inputs {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 4px;
}

.lf-lp-comp-input {
    width: 100%;
    padding: 6px 8px;
    background: var(--surface-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.lf-lp-comp-input:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 2px var(--cyan-alpha-20);
}

.lf-lp-comp-input::placeholder {
    color: var(--text-dim);
}

.lf-lp-comp-input--price {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    color: var(--cyan-400);
    text-align: right;
}

.lf-lp-comp-input--sqft {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    text-align: right;
    color: var(--text-muted);
}

/* Distance chip */
.lf-lp-comp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.lf-lp-comp-dist {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 9px;
    color: var(--text-dim);
}

.lf-lp-comp-dist input {
    width: 40px;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-heading);
    font-size: 9px;
    color: var(--text-muted);
    text-align: right;
    padding: 0;
}

/* Add comp button */
.lf-lp-add-comp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 7px;
    background: none;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    margin-top: 2px;
}

.lf-lp-add-comp:hover {
    border-color: var(--cyan-alpha-30);
    color: var(--cyan-500);
    background: var(--cyan-alpha-10);
}

.lf-lp-add-comp:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ARV derived display */
.lf-lp-comp-arv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: var(--cyan-alpha-10);
    border: 1px solid var(--cyan-alpha-20);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.lf-lp-comp-arv-label {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-widest);
    color: var(--text-muted);
    text-transform: uppercase;
}

.lf-lp-comp-arv-value {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--cyan-500);
    text-shadow: var(--glow-cyan-sm);
}

/* ============================================================
   SECTION 2 — MAP PLACEHOLDER
   ============================================================ */
.lf-lp-map-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 180px;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

/* Subtle grid overlay for map feel */
.lf-lp-map-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--cyan-alpha-10) 1px, transparent 1px),
        linear-gradient(90deg, var(--cyan-alpha-10) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    pointer-events: none;
}

.lf-lp-map-pin {
    font-size: var(--text-3xl);
    color: var(--cyan-500);
    opacity: 0.6;
    position: relative;
    z-index: 1;
    animation: float 4s ease-in-out infinite;
}

.lf-lp-map-address {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    text-align: center;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.lf-lp-map-label {
    font-family: var(--font-heading);
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* ============================================================
   SECTION 3 — PHOTOS GRID
   ============================================================ */
.lf-lp-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.lf-lp-photo-slot {
    aspect-ratio: 4 / 3;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
    position: relative;
    overflow: hidden;
}

.lf-lp-photo-slot:hover {
    border-color: var(--cyan-alpha-30);
    background: var(--glass-bg-hover);
}

.lf-lp-photo-slot--add {
    border-style: dashed;
    border-color: var(--cyan-alpha-20);
}

.lf-lp-photo-slot--add:hover {
    border-color: var(--cyan-alpha-50);
    background: var(--cyan-alpha-10);
}

.lf-lp-photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.lf-lp-photo-slot__icon {
    font-size: var(--text-xl);
    color: var(--text-dim);
    opacity: 0.5;
}

.lf-lp-photo-slot__label {
    font-family: var(--font-heading);
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.lf-lp-photo-slot--add .lf-lp-photo-slot__icon {
    color: var(--cyan-500);
    opacity: 0.6;
}

.lf-lp-photo-slot--add .lf-lp-photo-slot__label {
    color: var(--cyan-500);
    opacity: 0.7;
}

/* ============================================================
   SECTION 4 — NOTES
   ============================================================ */
.lf-lp-notes-wrap {
    position: relative;
}

.lf-lp-notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    background: var(--surface-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-primary);
    outline: none;
    resize: none;
    line-height: var(--leading-relaxed);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.lf-lp-notes-textarea:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 2px var(--cyan-alpha-20);
}

.lf-lp-notes-textarea::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

.lf-lp-notes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.lf-lp-notes-status {
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.lf-lp-notes-status--saving {
    color: var(--cyan-500);
}

.lf-lp-notes-status--saved {
    color: var(--color-positive);
}

.lf-lp-notes-charcount {
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--text-dim);
}
