/* Iowa County Recorders Map - CSS v2.2 */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600;700&display=swap');

:root {
    --primary-green:   #3B6D11;
    --light-green:     #C0DD97;
    --hover-green:     #7AB648;
    --selected-fill:   rgba(24, 95, 165, 0.22);
    --selected-stroke: #185FA5;
    --selected-blue:   #185FA5;
    --text-dark:       #111111;
    --text-mid:        #333333;
    --text-light:      #666666;
    --border-light:    #dde8cc;
    --panel-bg:        #f4f7f0;
    --white:           #ffffff;
    --shadow:          0 4px 16px rgba(0,0,0,0.10);
}

/* ── Container ───────────────────────────────────────────── */
#icrm-container {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

/* ── Instruction bar above map ───────────────────────────── */
#icrm-instruction {
    background: #ffffff;
    color: var(--text-dark);
    text-align: center;
    padding: 16px 24px 32px;
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.02em;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--border-light);
    border-bottom: 3px solid var(--primary-green);
    margin-bottom: 0;
}

#icrm-instruction strong {
    font-weight: 700;
    color: var(--primary-green);
}

/* ── Map wrapper ─────────────────────────────────────────── */
#icrm-map-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f8faf4 0%, #eef3e6 100%);
    overflow: hidden;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(59,109,17,0.08);
}

#icrm-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 380px;
}

/* ── County paths ────────────────────────────────────────── */
.icrm-county {
    cursor: pointer;
    transition: fill 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
    fill: var(--light-green);
    stroke: var(--white);
    stroke-width: 0.8;
    outline: none !important;
}

.icrm-county:hover {
    fill: var(--hover-green);
}

.icrm-county:focus,
.icrm-county:focus-visible,
.icrm-county:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

/* Selected: solid blue, same stroke as default — no thick border box */
.icrm-county.icrm-selected {
    fill: var(--selected-blue);
    stroke: var(--white);
    stroke-width: 0.8;
}

/* County labels */
.icrm-county-label {
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 6px;
    font-weight: 600;
    fill: #2a5209;
    pointer-events: none;
    user-select: none;
}

/* Selected county label — white so it reads on solid blue fill */
.icrm-county-label.icrm-label-selected {
    fill: #ffffff;
    font-weight: 700;
}

/* State border */
.icrm-state-border {
    fill: none;
    stroke: var(--primary-green);
    stroke-width: 1.8;
    pointer-events: none;
}

/* ── Scroll hint below map ───────────────────────────────── */
#icrm-scroll-hint {
    background: var(--panel-bg);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    text-align: center;
    padding: 10px 20px;
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    letter-spacing: 0.01em;
    display: none; /* shown via JS once a county is selected */
}

/* ── Info panel ──────────────────────────────────────────── */
.icrm-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 26px 30px;
    min-height: 90px;
}

.icrm-default {
    width: 100%;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    padding: 6px 0;
}

.icrm-default p { margin: 0; }

/* ── County details ──────────────────────────────────────── */
.icrm-details { width: 100%; }

#icrm-county-name {
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--selected-blue);
    margin: 0 0 18px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-light);
}

.icrm-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 28px;
    margin-bottom: 0;
}

.icrm-full-width {
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .icrm-detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .icrm-detail-grid { grid-template-columns: 1fr; }
}

.icrm-detail-item {
    display: flex;
    flex-direction: column;
}

.icrm-detail-item label {
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.icrm-detail-item p {
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}

.icrm-detail-item p a {
    color: var(--selected-blue);
    text-decoration: none;
}

.icrm-detail-item p a:hover {
    text-decoration: underline;
}

/* ── Action buttons ──────────────────────────────────────── */
.icrm-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.icrm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 11px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Prompt', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    border: none;
    cursor: pointer;
    outline: none;
}

.icrm-btn:focus-visible {
    outline: 2px solid var(--text-dark);
    outline-offset: 3px;
}

.icrm-btn-email {
    background: var(--selected-blue);
    color: var(--white) !important;
}

.icrm-btn-email:hover {
    background: #0c447c;
    box-shadow: 0 4px 14px rgba(24,95,165,0.30);
    color: var(--white) !important;
}

.icrm-btn-website {
    background: var(--primary-green);
    color: var(--white) !important;
}

.icrm-btn-website:hover {
    background: #2d5609;
    box-shadow: 0 4px 14px rgba(59,109,17,0.30);
    color: var(--white) !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .icrm-panel { padding: 18px 16px; }

    #icrm-county-name { font-size: 18px; }

    .icrm-btn {
        flex: 1;
        min-width: 130px;
        justify-content: center;
    }

    .icrm-actions { flex-direction: column; }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .icrm-county, .icrm-btn { transition: none !important; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
    .icrm-actions { display: none; }
    #icrm-county-details { page-break-inside: avoid; }
}
