/*
 * CC Service Map — frontend.css
 * Styles for the interactive service map shortcode output.
 *
 * Colour variables intentionally omitted — colours come from the
 * server-rendered inline styles (driven by the admin data) so the
 * map always reflects the current brand settings without needing
 * CSS overrides.
 */

/* ── Diagram ────────────────────────────────────────────────────────────── */

.cc-smap-diagram {
    width: 100%;
    overflow: hidden;
}

.cc-smap-diagram svg {
    display: block;
    width: 100%;
}

.cc-smap-node {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.cc-smap-node:hover,
.cc-smap-node:focus-visible {
    opacity: 0.82;
    outline: none;
}

.cc-smap-node.cc-smap-dim {
    opacity: 0.14;
    pointer-events: none;
}

.cc-smap-line {
    transition: opacity 0.25s ease;
}

.cc-smap-line.cc-smap-dim {
    opacity: 0.06;
}

/* SVG text styles (avoid inline SVG style="" on every element) */

.cc-smap-tier-label {
    font-size: 11px;
    fill: #999;
    font-family: inherit;
}

.cc-smap-node-title {
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    /* Fill set inline per-node via server-rendered style or data */
}

.cc-smap-node-sub {
    font-size: 11px;
    font-family: inherit;
}

/* ── Interactive panel ──────────────────────────────────────────────────── */

.cc-smap-panel {
    min-height: 0;
}

.cc-smap-panel-inner {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8e8e8;
}

.cc-smap-panel-heading {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1rem;
}

.cc-smap-panel-heading em {
    font-style: normal;
    font-weight: 400;
}

.cc-smap-group-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1rem 0 8px;
}

.cc-smap-group-label:first-child {
    margin-top: 0;
}

/* ── Service cards grid ─────────────────────────────────────────────────── */

.cc-smap-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 8px;
    margin-bottom: 4px;
}

.cc-smap-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cc-smap-card:hover {
    border-color: #bbb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cc-smap-card.cc-smap-card-sel {
    /* Selected border colour set inline per pillar colour */
}

.cc-smap-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 3px;
}

.cc-smap-card-type {
    font-size: 11px;
    color: #888;
}

/* ── Service detail panel ───────────────────────────────────────────────── */

.cc-smap-detail {
    margin-top: 12px;
    background: #f8f8f8;
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid #e5e5e5;
}

.cc-smap-detail-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.cc-smap-detail-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.cc-smap-detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cc-smap-tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-block;
    line-height: 1.6;
}

.cc-smap-tag-outcome {
    background: #EEEDFE;
    color: #534AB7;
}

/* ── SEO / static service list (shown without JS, hidden with JS) ────────── */

.cc-smap.cc-smap-js .cc-smap-services {
    /* Hidden once JS activates the interactive experience */
    display: none;
}

.cc-smap-services {
    margin-top: 2.5rem;
}

.cc-smap-pillar {
    margin-bottom: 2.5rem;
}

.cc-smap-pillar-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #1a1a1a;
}

.cc-smap-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.cc-smap-service {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
}

.cc-smap-svc-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.cc-smap-svc-type {
    font-size: 11px;
    color: #888;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cc-smap-svc-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

/* ── Print: always show static list ─────────────────────────────────────── */

@media print {
    .cc-smap.cc-smap-js .cc-smap-services {
        display: block !important;
    }
    .cc-smap-diagram,
    .cc-smap-panel {
        display: none;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .cc-smap-cards {
        grid-template-columns: 1fr 1fr;
    }
    .cc-smap-service-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .cc-smap-cards {
        grid-template-columns: 1fr;
    }
}
