/* ============================================================================
   ROOT KLEUREN
   ========================================================================== */
:root {
    --prim: #800000;
    --prim-soft: rgba(128,0,0,0.35);
    --tile-bg: #ffffff;
    --body-bg: #f5f3f3;
    --text: #333;
    --shadow: rgba(0,0,0,0.12);
}

/* ============================================================================
   BASICS
   ========================================================================== */
body {
    background: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    color: var(--text);
}

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: var(--prim);
    margin-bottom: 30px;
}

/* ============================================================================
   TOP SEARCH (Premium variant B)
   ========================================================================== */
.top-search {
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 6px 18px var(--shadow);
    margin-bottom: 35px;
}

.top-search input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 1.05em;
    border: 1.5px solid var(--prim-soft);
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.6),
                0 3px 9px rgba(0,0,0,0.10);
    outline: none;
    transition: 0.2s ease;
    background: #ffffff;
}

.top-search input:focus {
    border-color: var(--prim);
    box-shadow: inset 0 1px 4px rgba(255,255,255,0.7),
                0 4px 12px rgba(128,0,0,0.18);
}

/* Suggestielijst */
#address-suggestions {
    margin-top: 5px;
    background: #fff;
    border-radius: 10px;
    list-style: none;
    padding: 0;
    border: 1px solid var(--prim-soft);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
    z-index: 20;
}

#address-suggestions li {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95em;
}

#address-suggestions li:hover {
    background: rgba(128,0,0,0.08);
}

#global-search {
    margin-top: 18px;
    width: 100%;
    background: var(--prim);
    color: white;
    font-weight: bold;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s ease;
}

#global-search:hover {
    background: #5e0000;
}

.bron-links {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8em;
    color: #666;
}

/* ============================================================================
   DASHBOARD GRID
   ========================================================================== */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 25px;
}

/* ============================================================================
   TILES
   ========================================================================== */
.tile {
    background: var(--tile-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.tile summary {
    background: var(--prim);
    color: white;
    padding: 15px 18px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tile summary::-webkit-details-marker {
    display: none;
}

/* Titel met een subregel (France Travail, Trésorerie / SGC) */
.tile-title {
    display: flex;
    flex-direction: column;
}

.tile-sub {
    font-weight: normal;
    font-size: 0.75em;
    opacity: 0.85;
    margin-top: 3px;
}

.tile details[open] summary {
    background: #5e0000;
}

/* ============================================================================
   INFO ICON
   ========================================================================== */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.28);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s ease;
}

.info-icon:hover {
    background: rgba(255,255,255,0.45);
}

/* ============================================================================
   TILE RESULTS
   ========================================================================== */
/* Geen eigen schuifvenster per tegel: de iframe voegt zich naar de gemeten
   body-hoogte, dus een max-height hier zou de inhoud opsluiten in dertien
   kleine venstertjes terwijl de body kort blijft. De pagina zelf scrollt. */
.results {
    padding: 15px 18px;
}

.result-item {
    border: 1px solid #ddd;
    background: #fafafa;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.93em;
}

.result-item h3 {
    margin: 0 0 8px 0;
    font-size: 1em;
}

.loading {
    color: #777;
    font-style: italic;
}

.fallback-note {
    font-size: 0.75em;
    color: #555;
    font-style: italic;
}

/* ============================================================================
   TOOLTIP
   ========================================================================== */
#tooltip {
    position: absolute;
    background: #fff;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    width: 260px;
    z-index: 9999;
    border: 1px solid #ddd;
}

#tooltip.hidden {
    display: none;
}

#tooltip h3 {
    margin-top: 0;
    margin-bottom: 4px;
    color: var(--prim);
    font-size: 1.05em;
}

.tooltip-sub {
    margin: 0 0 8px 0;
    font-size: 0.82em;
    font-style: italic;
    color: #666;
}

.tooltip-link {
    color: var(--prim);
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}
