/* ============================================================
   CISPE Catalogue — Design tokens & shared utilities
   ============================================================ */

:root {
    --cde-primary:  #4e68f6;
    --cde-accent:   #eb412e;
    --cde-gradient: linear-gradient(to right, #4e68f6, #eb412e);

    /* Badge palette – location / tag / compliance */
    --badge-loc-text:    #d46b08;
    --badge-loc-bg:      #fff7e6;
    --badge-loc-border:  #ffd591;
    --badge-tag-text:    #0958d9;
    --badge-tag-bg:      #e6f4ff;
    --badge-tag-border:  #91caff;
    --badge-comp-text:   #389e0d;
    --badge-comp-bg:     #f6ffed;
    --badge-comp-border: #b7eb8f;
}

/* ── Brand gradient (Header / Footer) ───────────────────── */
.brand-header,
.brand-footer {
    background: var(--cde-gradient) !important;
}
.brand-header {
    padding: 20px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-footer {
    padding-inline: 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

/* Buttons / text placed on the gradient background */
.btn-on-gradient {
    color: white !important;
    border-color: white !important;
}

/* ── Dashboard search bar ───────────────────────────────── */
.search-input { background: white; border-radius: 4px 0 0 4px; }
.search-btn   {
    background: white !important;
    color: var(--cde-primary) !important;
    border-radius: 0 4px 4px 0;
    min-width: 50px;
    min-height: 39px;
    padding: 0 !important;
}

/* ── Summary stat cards ─────────────────────────────────── */
.stat-card { background-color: white; min-height: 100px; }

/* ── Map ────────────────────────────────────────────────── */
.map-container { height: 500px; }

/* Map zoom hint */
.map-hint {
    font-size: 11px;
    color: #333;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.8);
}

/* Marker cluster bubble – only dynamic size/font-size stay inline */
.cde-cluster-icon {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background-color: var(--cde-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Map popup card ─────────────────────────────────────── */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.custom-popup .leaflet-popup-content { margin: 0; }

.cde-popup-card {
    width: 268px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    padding: 16px;
}
.cde-popup-close {
    position: absolute; top: 8px; right: 8px;
    background: none; border: none;
    font-size: 20px; font-weight: 400; line-height: 1;
    cursor: pointer; color: #666;
    width: 24px; height: 24px; padding: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.cde-popup-close:hover { color: #333; }
.cde-popup-title {
    margin: 0 0 4px;
    font-size: 16px; font-weight: bold;
    color: #000; line-height: 1.3; padding-right: 30px;
}
.cde-popup-provider {
    margin-bottom: 12px;
    font-size: 13px; color: #666;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.cde-popup-tags { margin-bottom: 16px; }
.cde-popup-tag {
    display: inline-block;
    background: #f0f2f5; color: #e91e63;
    padding: 4px 8px; border-radius: 12px;
    font-size: 12px; font-weight: 500;
    margin: 3px; border: 1px solid #e91e63;
}
.cde-popup-footer {
    display: flex; align-items: center; gap: 8px;
    color: #000; font-size: 14px; font-weight: bold;
    cursor: pointer; text-decoration: underline;
    margin-top: 8px; padding-top: 16px;
    border-top: 1px dashed #ddd;
}
.cde-popup-footer:hover { color: var(--cde-primary); }

/* ── Key/value detail grids (attestation / document panels) */
.detail-grid {
    grid-template-columns: minmax(120px, auto) 1fr !important;
    width: auto !important;
    justify-items: start !important;
}

/* ── Hoverable cards ────────────────────────────────────── */
.q-card.hoverable {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}
.q-card.hoverable:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}
