* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Stained Glass Colors - Ocean Palette */
    --glass-1: #7eb8c9;
    --glass-2: #5a9fb8;
    --glass-3: #4a8ba8;
    --glass-4: #6bc4b8;
    --glass-5: #52b8a8;
    --glass-6: #a8d4d0;
    --glass-7: #8ec8c0;
    --glass-8: #78bcb4;
    --glass-9: #b8d8e8;
    --glass-10: #a0cce0;
    --base: #f5f7f8;
    --leading: rgba(40, 60, 70, 0.15);
    --ring: rgba(50, 70, 80, 0.08);

    /* Theme Colors - Light Disney Style */
    --bg-dark: #f8f9fa;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-muted: #95a5a6;
    --accent: #6bc4b8;
    --accent-hover: #5ab0a4;
    --adoption-gold: #6bc4b8;
}

body {
    background: transparent;
    color: var(--text-primary);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Subtle noise texture for marble feel */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.03;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Photo backgrounds removed */

/* ========== STAINED GLASS BACKGROUND (Golden Ratio - 8° segments) ========== */
.bg-golden-rose {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--base);
    overflow: hidden;
}

.bg-golden-rose svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250vmax;
    height: 250vmax;
    opacity: 0.55;
    filter: saturate(0.3);
}

.bg-golden-rose .shard {
    stroke: rgba(40, 60, 70, 0.15);
    stroke-width: 0.15;
}

.bg-golden-rose::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 40% at var(--glow-pos, 50% 46%),
        rgba(255, 255, 255, 0.7) 0%,
        rgba(250, 252, 253, 0.4) 25%,
        transparent 60%);
    pointer-events: none;
}

/* ========== HEADER / NAVIGATION ========== */
header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 20px;
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    align-items: center;
    height: 56px;
    flex-shrink: 0;
    position: relative;
    z-index: 550;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.logo {
    height: 36px;
    margin-right: 40px;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 8px;
    flex: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #5a6c7d;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: #2c3e50;
}

.nav-btn.active {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: #2c3e50;
    font-weight: 600;
}

.my-adoptions-btn {
    margin-left: auto;
    background: var(--accent);
    border: none;
    border-radius: 20px;
    color: #fff;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.my-adoptions-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

.adoption-count {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

/* Hamburger menu */
.hamburger-btn {
    display: none;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    color: #2c3e50;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
}

/* Mobile nav action buttons (inside hamburger dropdown, hidden on desktop) */
.mobile-nav-actions {
    display: none;
}


/* ========== FILTER BAR ========== */
.filter-bar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.filter-bar.hidden {
    display: none;
}

.filter-select {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    color: #2c3e50;
    padding: 8px 12px;
    font-size: 13px;
    min-width: 140px;
    cursor: pointer;
    font-weight: 500;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.filter-select option {
    background: #fff !important;
    color: #2c3e50 !important;
    padding: 8px 12px;
}

.filter-select option:checked {
    background: color-mix(in srgb, var(--accent) 20%, transparent) !important;
    color: #2c3e50 !important;
    font-weight: 600;
}

.filter-select option:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent) !important;
}

.search-input {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    color: #2c3e50;
    padding: 8px 12px;
    font-size: 13px;
    width: 200px;
    font-weight: 500;
}

.search-input::placeholder {
    color: rgba(44, 62, 80, 0.4);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.filter-stats {
    margin-left: auto;
    color: #5a6c7d;
    font-size: 13px;
    font-weight: 600;
}

/* ========== MAIN CONTENT ========== */
main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.view {
    display: none;
    width: 100%;
    height: 100%;
}

.view.active {
    display: flex;
}

/* ========== MAP VIEW ========== */
#map-view {
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-y: auto;
    z-index: 1;
}

.map-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px 4px;
    pointer-events: none;
    z-index: 10;
    flex-shrink: 0;
}

.hero-logo {
    width: 56px;
    height: auto;
    object-fit: contain;
    pointer-events: auto;
    flex-shrink: 0;
}

.hero-text {
    pointer-events: auto;
    text-align: center;
}

.map-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
    margin: 0;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

.map-subtitle {
    font-size: 1.1rem;
    color: #5a6c7d;
    font-style: italic;
    margin: 4px 0 0;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.6);
}

.map-intro {
    width: 100%;
    max-width: 800px;
    padding: 20px 20px 40px;
    flex-shrink: 0;
}

.map-intro .intro-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.map-intro .intro-section h2 {
    font-size: 18px;
    color: var(--accent);
    margin: 0 0 12px;
}

.map-intro .intro-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px;
}

.map-intro .intro-section p:last-child {
    margin-bottom: 0;
}

.map-intro .intro-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.map-intro .intro-steps li {
    color: var(--text-secondary);
    padding: 8px 0 8px 32px;
    position: relative;
    line-height: 1.5;
    counter-increment: step;
}

.map-intro .intro-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 8px;
}

#map-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    z-index: 1;
}

#map-svg {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#map-svg .region {
    fill: rgb(212, 168, 68);
    stroke: rgb(153, 115, 38);
    stroke-width: 1;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    transform-origin: center;
}

#map-svg .region:hover,
#map-svg .region.highlighted {
    filter: brightness(1.2);
    transform: translateY(-4px);
    stroke: rgb(128, 89, 26);
    stroke-width: 1.5;
}

#dot-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
    will-change: left, top;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.2s ease;
}

.dot:hover {
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.7);
    z-index: 5;
    transform: translate(-50%, -50%) scale(1.3);
}

.dot.lifted {
    transform: translate(-50%, calc(-50% - 8px));
    filter: brightness(1.3);
}

.dot.dimmed {
    opacity: 0.3;
    width: 8px;
    height: 8px;
}

.dot.highlight-needs-prayer {
    box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6);
    background: #FFD700 !important;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot.photo-mode {
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
}

#hover-info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 16px;
    background: rgba(0,0,0,0.8);
    padding: 12px 16px;
    border-radius: 6px;
    display: none;
    pointer-events: none;
}

/* Map filter button for highlighting adopted politicians */
.map-filter-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 16px;
    color: #2c3e50;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Show button only when map view is active */
#map-view.active .map-filter-btn {
    display: flex;
}

.map-filter-btn:hover {
    background: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}

.map-filter-btn .icon {
    font-size: 16px;
}

.map-filter-btn.active .icon {
    color: #FFD700;
}

/* ========== HEMICYCLE VIEW (Parliament/Senate/Government) ========== */
#parliament-view, #senate-view, #government-view, #eu-view {
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-y: auto;
}

.hemicycle-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 560px;
    transition: transform 0.15s ease-out;
}

.hemicycle-svg {
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease;
}

.seat {
    cursor: pointer;
}

.seat circle {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.85) saturate(0.9);
    animation: seat-breathe 4s ease-in-out infinite;
    animation-delay: var(--breathe-delay, 0s);
}

/* Breathing animation - slow, subtle, like candlelight */
@keyframes seat-breathe {
    0%, 100% {
        filter: brightness(0.8) saturate(0.85);
        transform: scale(1);
    }
    50% {
        filter: brightness(0.95) saturate(0.95);
        transform: scale(1.02);
    }
}

/* Hover: gentle lift with warm glow */
.seat:hover circle {
    filter: brightness(1.2) saturate(1.1) drop-shadow(0 0 8px rgba(255, 248, 230, 0.5));
    transform: scale(1.15) translateY(-2px);
    stroke: rgba(255, 248, 230, 0.8);
    stroke-width: 1.5;
    animation-play-state: paused;
}

/* Neighboring seats react subtly - handled via JS class */
.seat.neighbor-hover circle {
    filter: brightness(0.95) saturate(0.95);
    transform: scale(1.05);
    animation-play-state: paused;
}

.seat:active circle {
    filter: brightness(1.3) saturate(1);
    transform: scale(1.1);
}

.hemicycle-title {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.party-legend {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 90%;
}

.party-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.party-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========== LIST VIEW ========== */
#list-view {
    flex-direction: column;
    overflow: hidden;
}

.list-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.politician-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== PRAYER VIEW ========== */
#prayer-view {
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    overflow: hidden;
}

/* ========== ADMIN VIEW ========== */
#admin-view {
    flex-direction: column;
    overflow-y: auto;
    padding: 0;
}
#admin-dashboard-root {
    width: 100%;
    min-height: 80vh;
}

/* ========== ABOUT VIEW ========== */
#about-view {
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    overflow: hidden;
}

.about-scroll {
    max-height: 100%;
    overflow-y: auto;
    width: 100%;
    display: flex;
    justify-content: center;
}

.about-content {
    max-width: 800px;
    width: 100%;
}

.about-section {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

.about-section h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.about-section .subtitle {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-section h2 {
    font-size: 18px;
    margin: 24px 0 12px 0;
    color: var(--accent);
}

.about-section h3 {
    font-size: 15px;
    margin: 20px 0 10px 0;
    color: var(--text-primary);
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-section li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.about-section li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 8px;
}

.bible-verse {
    background: rgba(255, 255, 255, 0.95);
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.bible-verse .reference {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-size: 13px;
    color: var(--accent);
}

.prayer-text {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item .question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item .answer {
    color: var(--text-secondary);
    line-height: 1.6;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.topic-card h4 {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 10px;
}

.topic-card li {
    font-size: 13px;
    padding: 4px 0;
    padding-left: 16px;
}

.topic-card li::before {
    left: 0;
}

.source-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px;
}

.source-info a {
    color: var(--accent);
}

/* ========== SIDEBAR PANEL ========== */
#sidebar-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

#sidebar-panel.visible {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    position: relative;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2c3e50;
}

.sidebar-header p {
    color: #5a6c7d;
    font-size: 13px;
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #2c3e50;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* ========== POLITICIAN CARD ========== */
.politician-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.politician-card:hover {
    background: #fff;
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.politician-card.adopted {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, white);
}

.politician-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.politician-avatar-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.politician-info {
    flex: 1;
    min-width: 0;
}

.politician-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.politician-party {
    font-size: 12px;
    font-weight: 500;
}

.politician-role {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.politician-region {
    font-size: 11px;
    color: var(--text-muted);
}

.adoption-badge {
    display: inline-block;
    background: rgba(212, 168, 68, 0.2);
    color: var(--adoption-gold);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 6px;
}

.needs-adoption {
    display: inline-block;
    background: var(--bg-card);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 6px;
}

.legacy-badge {
    display: inline-block;
    background: rgba(140, 160, 200, 0.15);
    color: #8ca0c8;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    margin-top: 4px;
}

.adopt-btn {
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s;
}

.adopt-btn:hover {
    background: var(--accent-hover);
}

.adopt-btn.adopted {
    background: rgba(212, 168, 68, 0.2);
    color: var(--adoption-gold);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Faces background removed */

/* Stained glass solid color overrides */
header {
    /* solid color set above */
}

.filter-bar {
    /* solid color set above */
}

#sidebar-panel {
    z-index: 600;
}

.about-section {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Make main content area transparent */
main {
    background: transparent;
}

.view {
    background: transparent;
}

/* Map container - transparent, no box */
#map-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    position: relative;
    z-index: 10; /* Above content boxes */
}

/* (canvas styles removed — replaced by #dot-container and #map-svg above) */

/* Hemicycle containers */
.hemicycle-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* List container */
.list-container {
    background: transparent;
    backdrop-filter: none;
}

.politician-card {
    /* solid color set above */
}

.politician-card:hover {
    /* solid color set above */
}

/* ========== MOBILE ADMIN VISIBILITY ========== */
@media (max-width: 768px) {
    [data-mobile-hidden="true"] { display: none !important; }
}

/* Mobile settings panel */
.mobile-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.mobile-settings-panel {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    padding: 24px;
}

.mobile-settings-panel h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.mobile-settings-panel h4 {
    font-size: 14px;
    font-weight: 600;
    color: #5a6c7d;
    margin: 16px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-settings-panel label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
}

.mobile-settings-panel label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6bc4b8;
    cursor: pointer;
}

.mobile-settings-panel select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    font-size: 14px;
    color: #2c3e50;
    background: #f8f9fa;
    margin-top: 4px;
}

.mobile-settings-panel hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin: 16px 0;
}

.mobile-settings-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

.mobile-settings-actions button {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.mobile-settings-actions .ms-save {
    background: #6bc4b8;
    color: #fff;
    font-weight: 600;
}

.mobile-settings-actions .ms-cancel {
    background: #f0f0f0;
    color: #5a6c7d;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    header {
        padding: 0 10px;
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        position: relative;
    }

    .hamburger-btn {
        display: block;
    }

    .logo {
        height: 28px;
        margin-right: 10px;
    }

    nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 10px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: calc(100vh - 56px);
        max-height: calc(100dvh - 56px);
        overflow-y: auto;
    }

    nav.open {
        display: flex;
    }

    .nav-btn {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        font-size: 14px;
        white-space: nowrap;
    }

    .nav-btn:last-child {
        border-bottom: none;
    }

    .my-adoptions-btn,
    .sync-btn,
    .login-btn {
        display: none;
    }

    .mobile-nav-actions {
        display: flex;
        gap: 8px;
        padding: 12px 16px 8px;
        border-top: 1px solid var(--border);
        margin-top: 4px;
    }

    .mobile-adoptions-btn {
        flex: 1;
        background: var(--accent);
        border: none;
        border-radius: 8px;
        color: #fff;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 44px;
    }

    .mobile-adoptions-btn .adoption-count {
        background: rgba(255, 255, 255, 0.3);
        color: #fff;
        border-radius: 10px;
        padding: 2px 8px;
        font-size: 12px;
        font-weight: 700;
    }

    .mobile-login-btn {
        background: rgba(102, 126, 234, 0.15);
        border: 1px solid rgba(102, 126, 234, 0.3);
        border-radius: 8px;
        color: var(--accent);
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        min-height: 44px;
    }

    .adoption-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .map-hero {
        padding: 8px 12px 4px;
        gap: 10px;
    }

    .hero-logo {
        width: 40px;
    }

    .map-title {
        font-size: 1.4rem !important;
        line-height: 1.3;
    }

    .map-subtitle {
        font-size: 0.85rem !important;
        margin-top: 2px !important;
    }

    .map-intro {
        padding: 12px 12px 24px;
    }

    #map-container {
        min-height: 250px;
        aspect-ratio: 4 / 3;
        margin-top: 8px;
    }

    #map-svg, #dot-container {
        width: 100% !important;
        height: 100% !important;
    }

    #sidebar-panel {
        width: 100%;
        max-width: 100%;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .search-input {
        width: 100%;
        min-width: unset;
    }

    .filter-select {
        min-width: 0;
        flex: 1 1 calc(50% - 4px);
    }

    /* P1: Sidebar close button — 44px touch target */
    .close-btn {
        width: 44px;
        height: 44px;
        font-size: 22px;
        top: 10px;
        right: 10px;
    }

    /* P1: Reduce padding on about/prayer views */
    #prayer-view,
    #about-view {
        padding: 12px;
    }

    .about-section {
        padding: 16px;
    }

    /* P1: Hemicycle containers — responsive height */
    .hemicycle-container {
        height: auto;
        min-height: 280px;
        max-height: 70vh;
        aspect-ratio: 3 / 2;
    }

    /* P1: Touch-action to prevent browser gesture interference */
    #map-svg, #dot-container {
        touch-action: none;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 24px;
    }

    .nav-btn {
        padding: 8px 8px;
        font-size: 11px;
    }

    header {
        padding: 0 5px;
    }

    .map-hero {
        padding: 6px 10px 4px;
        gap: 8px;
    }

    .hero-logo {
        width: 32px;
    }

    .map-title {
        font-size: 1.2rem !important;
    }

    .map-subtitle {
        font-size: 0.8rem !important;
    }

    #map-container {
        margin-top: 6px;
    }
}

/* Hemicycle overlay on map */
.view.hemicycle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    z-index: 10;
    pointer-events: none;
}

.view.hemicycle-overlay .hemicycle-container {
    pointer-events: auto;
}

/* Override hemicycle container size when overlaid to match map */
.view.hemicycle-overlay .hemicycle-container {
    max-width: 800px;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
}

/* ========== BLOCK EDITOR ========== */

.block-editor {
    max-width: 800px;
    width: 100%;
}

.block-editor-item {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(107, 196, 184, 0.3);
    border-radius: 10px;
    margin-bottom: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.block-editor-item:hover {
    border-color: rgba(107, 196, 184, 0.6);
}

.block-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(107, 196, 184, 0.08);
    border-bottom: 1px solid rgba(107, 196, 184, 0.15);
}

.block-controls-left {
    display: flex;
    gap: 4px;
}

.block-ctrl-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.block-ctrl-btn:hover:not(:disabled) {
    background: #fff;
    border-color: var(--accent);
    color: var(--accent);
}

.block-ctrl-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.block-ctrl-btn.block-ctrl-delete:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.block-ctrl-btn-sm {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 1px 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.15s;
    flex-shrink: 0;
}

.block-ctrl-btn-sm.block-ctrl-delete:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.block-type-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.block-editor-content {
    padding: 16px;
}

.block-edit-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.block-edit-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(107, 196, 184, 0.15);
}

.block-edit-input.block-edit-title {
    font-size: 18px;
    font-weight: 600;
}

.block-edit-textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 8px;
    box-sizing: border-box;
    min-height: 60px;
}

.block-edit-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(107, 196, 184, 0.15);
}

.block-add-wrapper {
    text-align: center;
    padding: 6px 0;
    position: relative;
}

.block-add-btn {
    background: transparent;
    border: 2px dashed rgba(107, 196, 184, 0.3);
    border-radius: 6px;
    padding: 6px 20px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.block-add-btn:hover {
    border-color: var(--accent);
    background: rgba(107, 196, 184, 0.05);
}

.block-type-selector {
    position: absolute;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
    z-index: 100;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 340px;
    justify-content: center;
}

.block-type-option {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.block-type-option:hover {
    background: rgba(107, 196, 184, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.block-add-item-btn {
    background: transparent;
    border: 1px dashed rgba(107, 196, 184, 0.4);
    border-radius: 4px;
    padding: 4px 12px;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    font-family: inherit;
    transition: all 0.15s;
}

.block-add-item-btn:hover {
    background: rgba(107, 196, 184, 0.05);
    border-color: var(--accent);
}

/* Topic grid editor */
.topic-grid-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.topic-cat-editor {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.topic-cat-header {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 8px;
}

.topic-cat-header .block-edit-input {
    margin-bottom: 0;
    font-weight: 600;
}

/* FAQ editor */
.faq-item-editor {
    padding: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    position: relative;
}

.faq-item-editor .block-ctrl-btn-sm {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Steps / list items editor */
.block-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.block-list-item .block-edit-input {
    margin-bottom: 0;
    flex: 1;
}

.step-number {
    font-weight: 600;
    color: var(--accent);
    min-width: 24px;
    text-align: right;
}

/* ========== TOUCH DEVICE: disable sticky hover states ========== */
@media (hover: none) {
    .nav-btn:hover {
        background: transparent;
        color: var(--text-secondary);
    }
    .my-adoptions-btn:hover {
        transform: none;
        box-shadow: none;
    }
    .map-filter-btn:hover {
        background: rgba(255, 255, 255, 0.95);
        border-color: var(--border);
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .seat:hover circle {
        filter: none;
        transform: none;
        stroke: none;
        stroke-width: 0;
        animation-play-state: running;
    }
    .close-btn:hover {
        background: transparent;
        color: var(--text-secondary);
    }
    .politician-card:hover {
        border-color: var(--border);
        transform: none;
        box-shadow: none;
    }
    .adopt-btn:hover {
        background: var(--accent);
    }
}

/* ========== VERY SMALL PHONES (320px) ========== */
@media (max-width: 360px) {
    .politician-grid {
        grid-template-columns: 1fr;
    }
}
