/* =====================================================
   Attachment Styles Quiz — Table Layout
   Brand: Deep Teal #003333 | Gold #af9508
   ===================================================== */

:root {
    --asq-teal:       #003333;
    --asq-teal-mid:   #005555;
    --asq-teal-light: #e6f0f0;
    --asq-gold:       #af9508;
    --asq-gold-light: #faf4d3;
    --asq-white:      #ffffff;
    --asq-text:       #1a1a1a;
    --asq-muted:      #5a6a6a;
    --asq-border:     #c8d8d8;
    --asq-row-hover:  #f0f8f8;
    --asq-row-checked:#dff0ee;
    --asq-radius:     8px;
}

/* ── Wrapper ─────────────────────────────────────── */
.asq-quiz-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 12px 48px;
    color: var(--asq-text);
}

/* ── Step containers ─────────────────────────────── */
.asq-step[hidden] { display: none; }

/* ── Step 1: Consent / Intro ─────────────────────── */
.asq-intro-step {
    background: var(--asq-white);
    border: 1px solid var(--asq-border);
    border-radius: var(--asq-radius);
    padding: 32px 34px;
}
.asq-intro-heading {
    margin: 0 0 16px;
    font-size: 1.35rem;
    color: var(--asq-teal);
}
.asq-intro-text {
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--asq-text);
    margin-bottom: 22px;
}
.asq-intro-text p { margin: 0 0 14px; }
.asq-intro-text p:last-child { margin-bottom: 0; }

.asq-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--asq-gold-light);
    border-left: 4px solid var(--asq-gold);
    border-radius: 0 var(--asq-radius) var(--asq-radius) 0;
    padding: 14px 18px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--asq-text);
    cursor: pointer;
}
.asq-consent-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--asq-teal);
    cursor: pointer;
}

.asq-start-row {
    display: flex;
    justify-content: center;
    padding-top: 26px;
}
.asq-btn-primary:disabled {
    background: #aebcbc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ── Step 3: Name & Email Capture ────────────────── */
.asq-lead-step {
    background: var(--asq-white);
    border: 1px solid var(--asq-border);
    border-radius: var(--asq-radius);
    padding: 32px 34px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}
.asq-lead-heading {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: var(--asq-teal);
}
.asq-lead-text {
    font-size: 0.92rem;
    color: var(--asq-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}
.asq-field {
    text-align: left;
    margin-bottom: 16px;
}
.asq-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--asq-muted);
    margin-bottom: 6px;
}
.asq-field input[type="text"],
.asq-field input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.97rem;
    border: 1px solid var(--asq-border);
    border-radius: 6px;
    box-sizing: border-box;
}
.asq-field input:focus {
    outline: none;
    border-color: var(--asq-teal);
    box-shadow: 0 0 0 3px var(--asq-teal-light);
}
.asq-error {
    color: #b3261e;
    background: #fdecea;
    border-left: 4px solid #b3261e;
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: 0 6px 6px 0;
    text-align: left;
    margin: 0 0 16px;
}

/* ── Step 4: Confirmation ────────────────────────── */
.asq-thankyou-step {
    text-align: center;
    background: var(--asq-teal-light);
    border: 1px solid var(--asq-border);
    border-radius: var(--asq-radius);
    padding: 44px 34px;
    max-width: 480px;
    margin: 40px auto 0;
}
.asq-thankyou-icon { font-size: 2.6rem; margin-bottom: 14px; }
.asq-thankyou-message {
    font-size: 1.02rem;
    color: var(--asq-text);
    line-height: 1.6;
    margin: 0 0 26px;
}

/* ── Disclaimer ──────────────────────────────────── */
.asq-disclaimer {
    background: var(--asq-gold-light);
    border-left: 4px solid var(--asq-gold);
    border-radius: 0 var(--asq-radius) var(--asq-radius) 0;
    padding: 13px 18px;
    margin-bottom: 22px;
    font-size: 0.88rem;
    color: var(--asq-muted);
    line-height: 1.6;
    font-style: italic;
}
.asq-disclaimer p { margin: 0; }

/* ── Main Table ──────────────────────────────────── */
.asq-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--asq-border);
    border-radius: var(--asq-radius);
    overflow: hidden;
    font-size: 0.93rem;
}

/* Header rows */
.asq-table thead tr:first-child th {
    background: var(--asq-teal);
    color: var(--asq-white);
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.asq-table thead tr:first-child .asq-th-num,
.asq-table thead tr:first-child .asq-th-statement {
    background: var(--asq-teal);
    color: transparent; /* hide label text in first row for those cols */
}
.asq-th-group {
    text-align: center !important;
    border-left: 1px solid rgba(255,255,255,0.2);
}

/* ABC sub-header row */
.asq-th-abc-row th {
    background: #c9b44a !important; /* gold-ish header */
    color: var(--asq-teal) !important;
    padding: 7px 6px !important;
    font-weight: 800;
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid var(--asq-border);
}
.asq-th-abc-row th:first-child,
.asq-th-abc-row th:nth-child(2) {
    background: #eef6f6 !important;
    color: transparent !important;
    border-right: 1px solid var(--asq-border);
}
.asq-th-abc {
    border-left: 1px solid var(--asq-border);
    min-width: 52px;
}

/* Body rows */
.asq-table tbody tr {
    border-bottom: 1px solid var(--asq-border);
    transition: background 0.15s;
}
.asq-table tbody tr:last-child { border-bottom: none; }
.asq-table tbody tr:hover { background: var(--asq-row-hover); }
.asq-table tbody tr.asq-row-checked { background: var(--asq-row-checked); }

/* Number cell */
.asq-td-num {
    padding: 12px 10px 12px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--asq-gold);
    letter-spacing: 0.04em;
    vertical-align: middle;
    white-space: nowrap;
    width: 36px;
    border-right: 1px solid var(--asq-border);
}

/* Text cell */
.asq-td-text {
    padding: 12px 16px;
    line-height: 1.6;
    vertical-align: middle;
    color: var(--asq-text);
}

/* Checkbox cells */
.asq-td-check {
    width: 52px;
    text-align: center;
    vertical-align: middle;
    border-left: 1px solid var(--asq-border);
    padding: 8px 6px;
}

/* Checkbox label */
.asq-cb-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

/* Hide native checkbox */
.asq-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkmark box */
.asq-checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--asq-border);
    border-radius: 4px;
    background: var(--asq-white);
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.asq-checkbox:checked + .asq-checkmark {
    background: var(--asq-teal);
    border-color: var(--asq-teal);
}
.asq-checkbox:checked + .asq-checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.asq-cb-label:focus-within .asq-checkmark {
    outline: 2px solid var(--asq-gold);
    outline-offset: 2px;
}

/* Source citation */
.asq-source {
    font-size: 0.78rem;
    color: var(--asq-muted);
    font-style: italic;
    margin: 14px 0 28px;
    line-height: 1.5;
}

/* ── Submit row ───────────────────────────────────── */
.asq-submit-row {
    display: flex;
    justify-content: center;
    padding: 10px 0 30px;
}
.asq-btn-primary {
    background: var(--asq-teal);
    color: var(--asq-white);
    border: none;
    border-radius: var(--asq-radius);
    padding: 14px 44px;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px rgba(0,51,51,0.22);
    transition: background 0.18s, transform 0.15s, box-shadow 0.15s;
}
.asq-btn-primary:hover {
    background: var(--asq-teal-mid);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,51,51,0.28);
}

/* ── Results ──────────────────────────────────────── */
.asq-results {
    border: 2px solid var(--asq-teal);
    border-radius: 12px;
    overflow: hidden;
    animation: asq-fadeup 0.4s ease;
}
@keyframes asq-fadeup {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.asq-results-header {
    background: var(--asq-teal);
    padding: 28px 32px 22px;
    text-align: center;
}
.asq-result-badge { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.asq-result-label {
    color: var(--asq-white);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.asq-result-description {
    padding: 24px 32px;
    font-size: 0.97rem;
    line-height: 1.75;
    color: var(--asq-text);
    margin: 0;
    border-bottom: 1px solid var(--asq-border);
}

/* "Learn more" link shown under the result description (optional, per style) */
.asq-result-link-wrap {
    padding: 0 32px 22px;
    margin: 0;
    text-align: center;
}
.asq-result-link {
    display: inline-block;
    background: var(--asq-gold);
    color: var(--asq-white);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.15s;
}
.asq-result-link:hover { opacity: 0.85; }

/* Footer */
.asq-results-footer {
    background: var(--asq-teal-light);
    padding: 22px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.asq-professional-note {
    font-size: 0.83rem;
    color: var(--asq-muted);
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
}
.asq-btn-retake {
    background: transparent;
    border: 2px solid var(--asq-teal);
    color: var(--asq-teal);
    border-radius: 7px;
    padding: 9px 26px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.asq-btn-retake:hover { background: var(--asq-teal); color: var(--asq-white); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
    .asq-td-text { padding: 10px 10px; font-size: 0.88rem; }
    .asq-td-check { width: 40px; }
    .asq-checkmark { width: 18px; height: 18px; }
    .asq-results-header { padding: 20px; }
    .asq-result-description,
    .asq-result-link-wrap,
    .asq-results-footer { padding: 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .asq-results { animation: none; }
    .asq-btn-primary { transition: none; }
}
