/* ABLP Voter Lookup — Frontend Shortcode Styles */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800&display=swap');

.ablp-vl {
    --red:     #ff0000;
    --red-dim: rgba(255,0,0,0.08);
    --red-mid: rgba(255,0,0,0.15);
    --text:    #1a1a1a;
    --text-mid:#4a4a4a;
    --muted:   #888;
    --border:  rgba(0,0,0,0.1);
    --border2: rgba(0,0,0,0.06);
    --card:    rgba(0,0,0,0.03);
    --r: 10px;
    font-family: 'Figtree', sans-serif;
    color: var(--text);
    background: transparent;
    position: relative;
}

.ablp-vl-inner { padding: 1.5rem 0; }

/* Header */
.ablp-vl-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.ablp-vl-eyebrow {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: .5rem;
}
.ablp-vl-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: .4rem;
    line-height: 1.15;
}
.ablp-vl-sub {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.65;
    max-width: 440px;
    margin: 0 auto;
}

/* Step label */
.ablp-step-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: .65rem;
}

/* Constituency grid */
.ablp-c-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 7px;
    margin-bottom: 2rem;
}
.ablp-c-btn {
    padding: .65rem .9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-mid);
    font-family: 'Figtree', sans-serif;
    font-size: .82rem;
    cursor: pointer;
    text-align: left;
    transition: all .16s;
    line-height: 1.35;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ablp-c-btn:hover {
    border-color: rgba(255,0,0,0.35);
    color: var(--text);
    background: var(--red-dim);
}
.ablp-c-btn.active {
    border-color: var(--red);
    background: var(--red-dim);
    color: var(--text);
    font-weight: 600;
}
.ablp-c-btn-name { display: block; }
.ablp-c-btn-count {
    display: block;
    font-size: .68rem;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 400;
}
.ablp-c-btn.active .ablp-c-btn-count { color: var(--red); }

/* Search section */
.ablp-search-section { display: none; }
.ablp-search-section.visible { display: block; }

/* Active banner */
.ablp-banner {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: var(--red-dim);
    border: 1px solid rgba(255,0,0,0.18);
    margin-bottom: 1.1rem;
    gap: .75rem;
    flex-wrap: wrap;
}
.ablp-banner-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
}
.ablp-banner-cand {
    font-size: .74rem;
    color: var(--red);
    margin-top: 2px;
    font-weight: 500;
}
.ablp-change-btn {
    font-size: .72rem;
    font-family: 'Figtree', sans-serif;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem .7rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.ablp-change-btn:hover { color: var(--text); border-color: var(--text-mid); }

/* Search bar */
.ablp-search-wrap { position: relative; margin-bottom: .55rem; }
.ablp-search-icon {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    width: 17px; height: 17px; color: #bbb; pointer-events: none;
}
.ablp-search-input {
    width: 100%;
    padding: .9rem .9rem .9rem 2.6rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-family: 'Figtree', sans-serif;
    font-size: .95rem;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ablp-search-input::placeholder { color: #bbb; }
.ablp-search-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(255,0,0,0.07);
}
.ablp-search-hint { font-size: .74rem; color: var(--muted); margin-bottom: 1.1rem; }

/* Loader */
.ablp-loader { display: none; align-items: center; gap: .55rem; padding: 2rem; color: var(--muted); font-size: .82rem; }
.ablp-loader.visible { display: flex; }
.ablp-spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: ablp-spin .65s linear infinite;
}
@keyframes ablp-spin { to { transform: rotate(360deg); } }

/* Results meta */
.ablp-results-meta { font-size: .74rem; color: var(--muted); margin-bottom: .65rem; }
.ablp-results-meta strong { color: var(--text); }

/* Result cards */
.ablp-result-card {
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: #fff;
    padding: .9rem 1rem;
    margin-bottom: .4rem;
    transition: border-color .14s, box-shadow .14s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ablp-result-card:hover {
    border-color: rgba(255,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.ablp-result-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .35rem;
}
.ablp-result-name mark {
    background: rgba(255,0,0,0.08);
    color: #cc0000;
    border-radius: 3px;
    padding: 0 2px;
}
.ablp-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ablp-tag {
    display: inline-flex; align-items: center; gap: 3px;
    padding: .2rem .5rem;
    border-radius: 5px;
    background: #f7f7f7;
    border: 1px solid var(--border2);
    font-size: .68rem;
    color: var(--muted);
}
.ablp-tag svg { width: 10px; height: 10px; flex-shrink: 0; }

/* Share */
.ablp-share-row {
    display: flex; gap: 5px; flex-wrap: wrap;
    margin-top: .65rem; padding-top: .65rem;
    border-top: 1px solid var(--border2);
}
.ablp-share-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: .28rem .65rem;
    border-radius: 5px;
    font-size: .68rem;
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: opacity .14s;
}
.ablp-share-btn:hover { opacity: .82; }
.ablp-share-btn svg { width: 11px; height: 11px; }
.share-fb { background: #1877f2; color: #fff; }
.share-wa { background: #25d366; color: #fff; }
.share-tw { background: #000; color: #fff; border-color: #333; }
.share-cp { background: #f5f5f5; color: var(--muted); border-color: var(--border); }
.share-cp.copied { color: var(--red); border-color: var(--red); background: var(--red-dim); }

/* Pagination */
.ablp-pagination { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1.1rem; justify-content: center; }
.ablp-page-btn {
    min-width: 32px; height: 32px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-family: 'Figtree', sans-serif;
    font-size: .76rem;
    cursor: pointer;
    transition: all .14s;
    padding: 0 7px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ablp-page-btn:hover { border-color: var(--red); color: var(--red); }
.ablp-page-btn.active { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }
.ablp-page-btn:disabled { opacity: .3; cursor: default; }

/* State messages */
.ablp-state-msg { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.ablp-state-msg svg { width: 32px; height: 32px; margin-bottom: .6rem; opacity: .3; }
.ablp-state-msg p { font-size: .85rem; line-height: 1.65; }

/* Footer */
.ablp-vl-footer {
    text-align: center;
    padding: 1.1rem 0 .5rem;
    font-size: .68rem;
    color: #bbb;
    border-top: 1px solid var(--border2);
    line-height: 1.7;
}

@media(max-width:480px) {
    .ablp-vl-inner { padding: 1rem 0; }
    .ablp-c-grid { grid-template-columns: 1fr 1fr; }
}
