/* ==========================================================================
   Coaching Snapshot Program Assessment — Public Styles
   Plugin slug: coaching-snapshot-program-assessment-m
   All classes prefixed with .cspam- to avoid conflicts
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ── Reset / Base ─────────────────────────────────────────────────────────── */
.cspam-wrap,
.cspam-result-wrap {
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

/* ── Hero Banner ──────────────────────────────────────────────────────────── */
.cspam-hero {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    padding: 56px 0 48px;
    text-align: center;
    color: #fff;
}
.cspam-hero-inner {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}
.cspam-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
    color: #fff;
}
.cspam-subtitle {
    font-size: 1rem;
    opacity: .85;
    margin: 0 0 36px;
}

/* ── Scale bar ─────────────────────────────────────────────────────────────── */
.cspam-scale-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.cspam-scale-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
    max-width: 90px;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 10px 6px;
    transition: background .2s;
}
.cspam-scale-item:hover { background: rgba(255,255,255,.15); }
.cspam-scale-num {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}
.cspam-scale-label {
    font-size: .65rem;
    opacity: .75;
    text-align: center;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ── Sticky progress bar ──────────────────────────────────────────────────── */
.cspam-progress-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e8eaf0;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cspam-progress-inner {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cspam-progress-label {
    font-size: .75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.cspam-progress-track {
    flex: 1;
    height: 6px;
    background: #e8eaf0;
    border-radius: 99px;
    overflow: hidden;
}
.cspam-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2a6db5, #4a9fd4);
    border-radius: 99px;
    transition: width .4s ease;
}
.cspam-progress-pct {
    font-size: .8rem;
    font-weight: 600;
    color: #2a6db5;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
.cspam-form {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px 60px;
}

/* Section header */
.cspam-section { margin-top: 28px; padding-top: 4px; }
.cspam-section-header {
    background: linear-gradient(135deg, #0f3460, #1a4a7a);
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.cspam-section-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
}

/* Question card */
.cspam-question {
    background: #fff;
    border-bottom: 1px solid #e8eaf0;
    padding: 18px 0;
    transition: background .15s;
}
.cspam-question:last-child { border-bottom: none; }
.cspam-question.answered   { background: #f8fffe; }
.cspam-question-text {
    font-size: .92rem;
    font-weight: 700;
    color: #0f3460;
    margin: 0 0 12px;
    line-height: 1.5;
}

/* Options */
.cspam-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
}
.cspam-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 0;
    background: none;
    border: none;
    position: relative;
    white-space: nowrap;
    transition: color .15s;
}
.cspam-option input[type="radio"] {
    position: static;
    opacity: 1;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #2a6db5;
    flex-shrink: 0;
}
.cspam-option-num { display: none; }
.cspam-option-label {
    font-size: .82rem;
    font-weight: 500;
    color: #374151;
}
.cspam-option:hover .cspam-option-label { color: #2a6db5; }
.cspam-option.selected .cspam-option-label {
    color: #2a6db5;
    font-weight: 700;
}

/* Personal details section */
.cspam-personal-section {
    margin-top: 32px;
    background: #fff;
    border: 1.5px solid #e8eaf0;
    border-radius: 12px;
    overflow: hidden;
}
.cspam-personal-header {
    background: linear-gradient(135deg, #0f3460, #2a6db5);
    color: #fff;
    padding: 18px 24px;
}
.cspam-personal-header h2 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}
.cspam-personal-header p {
    margin: 0;
    font-size: .82rem;
    opacity: .85;
}
.cspam-personal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 24px;
}
.cspam-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cspam-field-group label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
}
.cspam-required { color: #ef4444; }
.cspam-field-group input {
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .9rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fafbff;
    width: 100%;
}
.cspam-field-group input:focus {
    border-color: #2a6db5;
    box-shadow: 0 0 0 3px rgba(42,109,181,.15);
    background: #fff;
}
.cspam-field-group input::placeholder { color: #9ca3af; }

/* Submit row */
.cspam-submit-row {
    text-align: center;
    padding-top: 32px;
}
.cspam-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: .9rem;
}
.cspam-btn-submit {
    background: linear-gradient(135deg, #1e5490, #2a6db5);
    color: #fff;
    border: none;
    padding: 16px 48px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: .5px;
    transition: opacity .2s, transform .1s;
}
.cspam-btn-submit:hover   { opacity: .9; transform: translateY(-1px); }
.cspam-btn-submit:active  { transform: translateY(0); }
.cspam-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Overlay */
.cspam-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,52,96,.75);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 20px;
}
.cspam-overlay p { font-size: 1.1rem; font-weight: 600; }
.cspam-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cspam-spin .8s linear infinite;
}
@keyframes cspam-spin { to { transform: rotate(360deg); } }

/* ── Result Page ──────────────────────────────────────────────────────────── */
.cspam-result-wrap {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px 80px;
}
.cspam-result-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #fff;
    padding: 52px 36px;
    border-radius: 14px;
    margin-bottom: 28px;
    margin-top: 36px;
}
.cspam-result-header h1 { font-size: 2rem; margin: 0 0 12px; color: #fff; }
.cspam-result-intro { font-size: .95rem; opacity: .85; margin: 0; max-width: 620px; line-height: 1.65; }

/* Overall score card */
.cspam-overall-card {
    background: #fff;
    border: 1.5px solid #e8eaf0;
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}
.cspam-overall-score {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.cspam-score-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.cspam-score-circle.bar-green  { background: linear-gradient(135deg, #22c55e, #16a34a); }
.cspam-score-circle.bar-yellow { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cspam-score-circle.bar-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.cspam-score-num   { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.cspam-score-denom { font-size: .7rem; opacity: .8; }
.cspam-score-meta h2 { margin: 0 0 4px; font-size: 1.1rem; color: #1e293b; }
.cspam-pct { font-size: 2rem; font-weight: 800; color: #2a6db5; margin: 0; }

.cspam-section-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}
.cspam-pill {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    border-radius: 10px;
    min-width: 140px;
    flex: 1;
}
.cspam-pill.bar-green  { background: #f0fdf4; border: 1.5px solid #86efac; }
.cspam-pill.bar-yellow { background: #fffbeb; border: 1.5px solid #fde68a; }
.cspam-pill.bar-red    { background: #fef2f2; border: 1.5px solid #fecaca; }
.pill-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; }
.pill-score { font-size: 1.4rem; font-weight: 800; }
.bar-green  .pill-score { color: #16a34a; }
.bar-yellow .pill-score { color: #d97706; }
.bar-red    .pill-score { color: #dc2626; }

/* Detailed table */
.cspam-section-heading {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #0f3460;
    margin: 32px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaf0;
}
.cspam-table-scroll { overflow-x: auto; }
.cspam-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.cspam-table th {
    background: #0f3460;
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.cspam-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.cspam-table tr:hover td { background: #f8fafc; }
.cspam-competency-cell {
    font-weight: 700;
    color: #0f3460;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    vertical-align: top !important;
    padding-top: 16px !important;
    white-space: nowrap;
}
.cspam-score-cell { font-weight: 700; text-align: center; width: 60px; }
.cspam-bar-cell   { width: 200px; min-width: 140px; }
.cspam-bar-track {
    height: 10px;
    background: #e8eaf0;
    border-radius: 99px;
    overflow: hidden;
}
.cspam-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .6s ease;
}
.cspam-bar-fill.bar-green  { background: linear-gradient(90deg, #22c55e, #16a34a); }
.cspam-bar-fill.bar-yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cspam-bar-fill.bar-red    { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Legend table */
.cspam-legend-wrap { margin-top: 32px; }
.cspam-legend-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cspam-legend-table th {
    background: #f8fafc;
    color: #374151;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
}
.cspam-legend-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.5;
}
.cspam-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.cspam-dot.bar-green  { background: #22c55e; }
.cspam-dot.bar-yellow { background: #f59e0b; }
.cspam-dot.bar-red    { background: #ef4444; }

/* Notice */
.cspam-notice {
    background: #fef9c3;
    border: 1px solid #fde047;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: .95rem;
    color: #713f12;
    margin: 24px 0;
}

/* ── PDF Download Button ──────────────────────────────────────────────────── */
.cspam-result-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cspam-result-header-text { flex: 1; }
.cspam-pdf-btn-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}
.cspam-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    background: #2a6db5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(42,109,181,.35);
    transition: background .18s, transform .12s, box-shadow .18s;
    letter-spacing: .2px;
}
.cspam-btn-pdf:hover {
    background: #1e5490;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(42,109,181,.45);
    color: #fff;
    text-decoration: none;
}
.cspam-btn-pdf:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(42,109,181,.3);
}
.cspam-btn-pdf svg { flex-shrink: 0; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .cspam-title    { font-size: 1.5rem; }
    .cspam-scale-bar { gap: 3px; }
    .cspam-scale-item { min-width: 40px; padding: 7px 4px; }
    .cspam-scale-num  { font-size: 1.1rem; }
    .cspam-options    { gap: 4px 14px; flex-wrap: wrap; }
    .cspam-option     { white-space: normal; }
    .cspam-option-label { font-size: .78rem; }
    .cspam-btn-submit { width: 100%; }
    .cspam-overall-card { flex-direction: column; }
    .cspam-score-circle { width: 76px; height: 76px; }
    .cspam-score-num  { font-size: 1.4rem; }
    .cspam-form       { padding: 0 16px 60px; }
    .cspam-hero-inner { padding: 0 16px; }
    .cspam-progress-inner { padding: 0 16px; }
    .cspam-result-wrap { padding: 0 16px 80px; }
    .cspam-personal-grid { grid-template-columns: 1fr; }
    .cspam-result-header-inner { flex-direction: column; gap: 18px; }
    .cspam-pdf-btn-wrap { width: 100%; }
    .cspam-btn-pdf { width: 100%; justify-content: center; }
}
