/* Maturity assessment widget.

   Ported from the standalone Data Strategy microsite and restyled for this
   site's dark palette. The class names, markup and behaviour are unchanged:
   assess.js renders these elements and is not modified. The five level
   colours are set inline by assess.js and are deliberately left alone, so the
   on-screen chips match the colours used in the generated PDF. */

.assess-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 980px;
    margin: 0 auto;
}

.assess-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.assess-privacy,
.assess-noscript {
    margin-top: 1.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.assess-privacy strong {
    color: var(--text-primary);
}

.assess-privacy a,
.assess-noscript a {
    color: var(--text-accent);
    text-decoration: underline;
}

.ds-assess {
    font-family: inherit;
    color: var(--text-primary);
}

/* --- Pillar rows --------------------------------------------------------- */
.ds-pillars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 2rem;
}

.ds-prow {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) 3fr 150px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ds-prow:last-child {
    border-bottom: none;
}

.ds-pname strong {
    color: var(--text-primary);
    font-size: 1rem;
    display: block;
    margin-bottom: 3px;
}

.ds-pname small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* --- Slider -------------------------------------------------------------- */
.ds-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    outline: none;
}

.ds-slider:focus-visible {
    outline: 2px solid var(--text-accent);
    outline-offset: 6px;
}

.ds-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text-accent);
    cursor: pointer;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.ds-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text-accent);
    cursor: pointer;
    border: 3px solid var(--bg-card);
}

/* --- Level chip (background colour is set inline by assess.js) ----------- */
.ds-level {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    min-width: 110px;
}

/* --- Score summary ------------------------------------------------------- */
.ds-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

.ds-stat {
    text-align: center;
}

.ds-stat .ds-num {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-accent);
    line-height: 1.15;
}

.ds-stat .ds-num.ds-rec {
    font-size: 1.1rem;
    line-height: 1.35;
    color: var(--text-primary);
}

.ds-stat .ds-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* --- Lead capture form --------------------------------------------------- */
.ds-form {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--text-primary);
    padding: 1.75rem;
    border-radius: 12px;
}

.ds-form h3 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.ds-form .ds-help {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.ds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.ds-grid input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    width: 100%;
}

.ds-grid input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.ds-grid input:focus {
    outline: 2px solid var(--text-accent);
    outline-offset: 1px;
}

.ds-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    cursor: pointer;
    line-height: 1.45;
}

.ds-consent input {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #0ea5e9;
}

.ds-btn {
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
    transition: var(--transition);
}

.ds-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.ds-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    box-shadow: none;
}

.ds-error {
    display: none;
    background: rgba(192, 0, 0, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fca5a5;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 0.9rem;
}

.ds-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(45, 125, 70, 0.5);
    color: var(--text-primary);
    padding: 1.75rem;
    border-radius: 12px;
}

.ds-success h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.ds-success p {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.ds-success a {
    color: var(--text-accent);
    text-decoration: underline;
}

.ds-success .ds-help {
    font-size: 0.85rem;
    opacity: 0.9;
}

.ds-hide {
    display: none;
}

@media (max-width: 820px) {
    .assess-panel {
        padding: 1.75rem 1.25rem;
    }

    .ds-prow {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .ds-summary {
        grid-template-columns: 1fr;
    }

    .ds-grid {
        grid-template-columns: 1fr;
    }

    .ds-level {
        width: 100%;
    }
}
