/*
 * Shared Call Score presentation.
 *
 * Used by the homepage dialog and the public tokenized
 * Call Score page. Homepage placement remains separate.
 */

.sf-call-score-panel,
.sf-call-score-panel *,
.sf-call-score-panel *::before,
.sf-call-score-panel *::after {
    box-sizing: border-box;
}

.sf-call-score-panel {
    display: grid;
    gap: 16px;
    width: 100%;
    color: var(--sf-text);
}

.sf-call-score-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sf-call-score-panel-header > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sf-call-score-panel-header span {
    color: #f1f3f5;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sf-call-score-panel-header b {
    padding: 4px 8px;
    border: 1px solid rgba(212, 173, 89, 0.48);
    border-radius: 999px;
    color: var(--sf-gold-light);
    background: rgba(212, 173, 89, 0.06);
    font-size: 8px;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sf-call-score-explainer {
    max-width: 36em;
    margin: -7px 0 0;
    color: var(--sf-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.45;
}

.sf-call-score-close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(224, 232, 240, 0.18);
    border-radius: 50%;
    color: #d7dde3;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.025)
        ),
        #10151b;
    font-size: 22px;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 5px 12px rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.sf-call-score-close:hover,
.sf-call-score-close:focus-visible {
    border-color: rgba(239, 221, 177, 0.72);
    color: #ffffff;
}

.sf-call-score-close:focus-visible,
.sf-call-score-privacy:focus-visible,
.sf-call-score-share:focus-visible {
    outline: 2px solid var(--sf-gold-light);
    outline-offset: 3px;
}

.sf-call-score-primary {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 154px;
    justify-items: center;
    align-content: center;
    gap: 8px;
    overflow: hidden;
    padding: 20px 18px 16px;
    border: 5px double #e2eaf2;
    background:
        radial-gradient(
            circle at center,
            rgba(61, 94, 140, 0.22),
            transparent 52%
        ),
        #050607;
    clip-path: polygon(
        5% 0,
        95% 0,
        100% 13%,
        100% 87%,
        95% 100%,
        5% 100%,
        0 87%,
        0 13%
    );
    box-shadow:
        inset 0 0 20px rgba(191, 222, 255, 0.36),
        0 12px 30px rgba(0, 0, 0, 0.34);
}

.sf-call-score-primary::before,
.sf-call-score-primary::after {
    position: absolute;
    z-index: -1;
    content: "";
    background: rgba(255, 255, 255, 0.68);
}

.sf-call-score-primary::before {
    top: 12px;
    right: 9%;
    left: 9%;
    height: 2px;
}

.sf-call-score-primary::after {
    top: 13%;
    bottom: 13%;
    left: 12px;
    width: 2px;
}

.sf-call-score-primary strong {
    color: #f4f5f6;
    font-family:
        "Arial Narrow",
        Arial,
        Helvetica,
        sans-serif;
    font-size: clamp(78px, 18vw, 102px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.055em;
    line-height: 0.82;
    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.76);
}

.sf-call-score-primary span {
    display: grid;
    grid-template-columns: 44px auto 44px;
    align-items: center;
    gap: 9px;
    color: #aeb2b8;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.16em;
    line-height: 1;
    white-space: nowrap;
}

.sf-call-score-primary span::before,
.sf-call-score-primary span::after {
    height: 1px;
    background: #aeb2b8;
    content: "";
}

.sf-call-score-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.sf-call-score-stats > div {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 76px;
    align-content: center;
    gap: 7px;
    overflow: hidden;
    padding: 11px 7px 9px;
    border: 1px solid rgba(222, 230, 239, 0.13);
    border-radius: 11px;
    background:
        linear-gradient(
            155deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.01)
        ),
        rgba(2, 5, 8, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    text-align: center;
}

.sf-call-score-stats > div::before {
    position: absolute;
    top: 0;
    right: 18%;
    left: 18%;
    height: 1px;
    background: rgba(212, 173, 89, 0.52);
    content: "";
}

.sf-call-score-stats span {
    color: var(--sf-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.075em;
    line-height: 1.25;
    text-transform: uppercase;
}

.sf-call-score-stats strong {
    color: #f1f3f5;
    font-family:
        "Arial Narrow",
        Arial,
        sans-serif;
    font-size: 25px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.sf-call-score-trend {
    padding-top: 15px;
    border-top: 1px solid rgba(222, 230, 239, 0.12);
}

.sf-call-score-trend-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sf-call-score-trend-heading h3 {
    margin: 0;
    color: #f1f3f5;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.sf-call-score-trend-heading span {
    color: var(--sf-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sf-call-score-chart {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(222, 230, 239, 0.1);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.2);
}

.sf-call-score-chart svg {
    display: block;
    width: 100%;
    height: 122px;
    overflow: visible;
}

.sf-call-score-neutral-line {
    stroke: rgba(212, 173, 89, 0.3);
    stroke-width: 0.8;
    stroke-dasharray: 3 3;
}

.sf-call-score-trend-line {
    fill: none;
    stroke: #dce8f4;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.sf-call-score-trend-point {
    fill: var(--sf-gold-light);
    stroke: #05080b;
    stroke-width: 0.8;
    vector-effect: non-scaling-stroke;
}

.sf-call-score-chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--sf-muted);
    font-size: 9px;
    font-weight: 800;
}

.sf-call-score-empty {
    margin: 13px 0 0;
    padding: 20px 14px;
    border: 1px dashed rgba(222, 230, 239, 0.16);
    border-radius: 11px;
    color: var(--sf-muted);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent
        ),
        rgba(0, 0, 0, 0.18);
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.sf-call-score-empty--compact {
    margin-top: 9px;
    padding: 9px 10px;
    font-size: 10px;
    line-height: 1.35;
}

.sf-call-score-privacy {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 11px 10px 14px;
    border: 1px solid rgba(222, 230, 239, 0.14);
    border-radius: 11px;
    color: var(--sf-text);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.012)
        ),
        rgba(0, 0, 0, 0.28);
    font: inherit;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    cursor: pointer;
}

.sf-call-score-privacy span {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.sf-call-score-privacy b {
    min-width: 48px;
    padding: 6px 10px;
    border: 1px solid rgba(222, 230, 239, 0.13);
    border-radius: 999px;
    color: #949ca5;
    background: rgba(255, 255, 255, 0.045);
    font-size: 9px;
    letter-spacing: 0.1em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.sf-call-score-privacy[aria-pressed="true"] b {
    border-color: rgba(212, 173, 89, 0.52);
    color: var(--sf-gold-light);
    background: rgba(212, 173, 89, 0.08);
}

.sf-call-score-privacy-note {
    margin: -10px 3px 0;
    color: var(--sf-muted);
    font-size: 10px;
    line-height: 1.45;
}

.sf-call-score-share {
    min-height: 46px;
    border: 1px solid #e0c57c;
    border-radius: 11px;
    color: #050708;
    background:
        linear-gradient(
            180deg,
            #f3dda0,
            #cba94e
        );
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 7px 15px rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.sf-call-score-share:hover:not(:disabled),
.sf-call-score-share:focus-visible:not(:disabled) {
    background:
        linear-gradient(
            180deg,
            #f8e8b9,
            #d6b65d
        );
}

.sf-call-score-share:disabled {
    border-color: rgba(222, 230, 239, 0.09);
    color: #697078;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    cursor: not-allowed;
}

.sf-call-score-page {
    min-height: 100dvh;
    margin: 0;
    color: var(--sf-text);
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(22, 62, 75, 0.27),
            transparent 44%
        ),
        #05080b;
}

.sf-call-score-page-shell {
    display: grid;
    width: min(500px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 54px;
}

.sf-call-score-page-logo {
    display: block;
    width: min(260px, 70vw);
    margin: 0 auto 8px;
}

.sf-call-score-page-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.sf-call-score-owner {
    margin: 0 0 18px;
    color: var(--sf-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.sf-call-score-page-shell
.sf-call-score-panel {
    padding: 22px;
    border: 1px solid rgba(222, 230, 239, 0.16);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(31, 72, 91, 0.16),
            transparent 32%
        ),
        rgba(13, 18, 24, 0.98);
    box-shadow:
        0 24px 58px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

@media (max-width: 520px) {
    .sf-call-score-page-shell {
        width: min(100% - 18px, 500px);
        padding-top: 14px;
    }

    .sf-call-score-page-shell
    .sf-call-score-panel {
        padding: 16px;
    }

    /* MOBILE CALL SCORE FIT START */

    .sf-call-score-sheet
    .sf-call-score-panel {
        gap: 10px;
    }

    .sf-call-score-sheet
    .sf-call-score-panel-header {
        gap: 10px;
    }

    .sf-call-score-sheet
    .sf-call-score-explainer {
        margin-top: -4px;
        font-size: 10px;
        line-height: 1.3;
    }

    .sf-call-score-primary {
        min-height: 140px;
    }

    .sf-call-score-sheet
    .sf-call-score-primary {
        min-height: 124px;
        padding: 14px 14px 11px;
    }

    .sf-call-score-primary strong {
        font-size: clamp(72px, 24vw, 94px);
    }

    .sf-call-score-stats {
        gap: 5px;
    }

    .sf-call-score-sheet
    .sf-call-score-stats > div {
        min-height: 62px;
        gap: 5px;
        padding: 8px 3px 7px;
    }

    .sf-call-score-stats > div {
        padding-inline: 4px;
    }

    .sf-call-score-stats span {
        font-size: 7px;
    }

    .sf-call-score-stats strong {
        font-size: 22px;
    }

    .sf-call-score-sheet
    .sf-call-score-trend {
        padding-top: 10px;
    }

    .sf-call-score-sheet
    .sf-call-score-empty--compact {
        margin-top: 6px;
        padding: 6px 8px;
        font-size: 9px;
        line-height: 1.3;
    }

    .sf-call-score-sheet
    .sf-call-score-privacy {
        min-height: 42px;
        padding: 8px 9px 8px 12px;
    }

    .sf-call-score-sheet
    .sf-call-score-privacy-note {
        margin: -6px 3px 0;
        font-size: 9px;
        line-height: 1.3;
    }

    .sf-call-score-sheet
    .sf-call-score-share {
        min-height: 40px;
    }

    /* MOBILE CALL SCORE FIT END */
}
