/* ============================================================
   DISC Personality Quiz — disc-quiz.css
   Prefix: disc-  (all classes/IDs use this prefix)
   ============================================================ */

/* ---------- Reset inside container ---------- */
.disc-quiz-container *,
.disc-results-wrap *,
.disc-gate-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   QUIZ CONTAINER
   ============================================================ */
.disc-quiz-container {
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: #333;
    padding: 0 16px 40px;
}

/* ---------- Progress ---------- */
.disc-progress-wrapper {
    margin-bottom: 28px;
}

.disc-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.disc-progress-pct {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.disc-step-label {
    font-size: 13px;
    color: #888;
}

.disc-progress-track {
    width: 100%;
    height: 7px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.disc-progress-fill {
    height: 100%;
    background: #2e7d4f;
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* ---------- Scale Header ---------- */
.disc-scale-header {
    margin-bottom: 22px;
}

.disc-scale-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    color: #222;
}

.disc-scale-labels {
    display: flex;
    justify-content: space-around;
    padding: 0 4px;
}

.disc-scale-labels span {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #777;
    line-height: 1.3;
}

/* ---------- Questions ---------- */
.disc-questions-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.disc-question-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.disc-question-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.disc-question-text {
    font-size: 14px;
    color: #333;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

.disc-radio-group {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

/* Hidden real radio inputs */
.disc-radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio circles */
.disc-radio-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.disc-radio-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    background: transparent;
    position: relative;
}

.disc-radio-circle::after {
    content: '';
    display: none;
}

/* Value-specific colors (matching personality.co screenshot) */
.disc-radio-label[data-val="1"] .disc-radio-circle {
    border-color: #f28b82;
    background: #fff0ef;
}
.disc-radio-label[data-val="2"] .disc-radio-circle {
    border-color: #f5c07a;
    background: #fff8ef;
}
.disc-radio-label[data-val="3"] .disc-radio-circle {
    border-color: #bdbdbd;
    background: #f5f5f5;
}
.disc-radio-label[data-val="4"] .disc-radio-circle {
    border-color: #81c995;
    background: #f0faf2;
}
.disc-radio-label[data-val="5"] .disc-radio-circle {
    border-color: #4caf8a;
    background: #e8f8f2;
}

/* Checked state */
.disc-radio-group input[type="radio"]:checked + .disc-radio-circle {
    color: #555;
}

.disc-radio-label[data-val="1"] input:checked ~ .disc-radio-circle,
.disc-radio-label[data-val="1"] input[type="radio"]:checked + .disc-radio-circle {
    background: #f28b82;
    border-color: #f28b82;
}
.disc-radio-label[data-val="2"] input[type="radio"]:checked + .disc-radio-circle {
    background: #f5c07a;
    border-color: #f5c07a;
}
.disc-radio-label[data-val="3"] input[type="radio"]:checked + .disc-radio-circle {
    background: #757575;
    border-color: #757575;
}
.disc-radio-label[data-val="4"] input[type="radio"]:checked + .disc-radio-circle {
    background: #81c995;
    border-color: #81c995;
}
.disc-radio-label[data-val="5"] input[type="radio"]:checked + .disc-radio-circle {
    background: #4caf8a;
    border-color: #4caf8a;
}

/* Checkmark when selected */
.disc-radio-label input[type="radio"]:checked + .disc-radio-circle::after {
    content: '✓';
    display: block;
    font-size: 18px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.disc-radio-label .disc-radio-circle:hover {
    transform: scale(1.08);
}

/* ---------- Navigation ---------- */
.disc-nav-area {
    text-align: center;
    margin-top: 8px;
}

.disc-validation-msg {
    font-size: 13px;
    color: #e53935;
    margin-bottom: 10px;
    display: none;
}
.disc-validation-msg.disc-visible {
    display: block;
}

.disc-btn-next {
    display: block;
    width: 100%;
    padding: 16px;
    background: #2e7d4f;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.disc-btn-next:hover {
    background: #256040;
}

.disc-btn-next:active {
    transform: scale(0.98);
}

.disc-btn-next:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
}

/* ---------- Loading state ---------- */
.disc-loading {
    text-align: center;
    padding: 40px 20px;
    color: #555;
    font-size: 15px;
}

.disc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #2e7d4f;
    border-radius: 50%;
    animation: disc-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes disc-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   RESULTS PAGE
   ============================================================ */
.disc-results-body {
    background: #f4f6f8;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

.disc-results-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

/* --- Results Header --- */
.disc-results-header {
    text-align: center;
    margin-bottom: 28px;
}

.disc-site-logo {
    font-size: 13px;
    color: #2e7d4f;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 8px;
}

.disc-results-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.disc-result-date {
    font-size: 12px;
    color: #999;
}

/* --- Primary Type Card --- */
.disc-primary-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-top: 5px solid var(--disc-type-color, #2ecc71);
}

.disc-primary-badge {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.disc-primary-info {
    flex: 1;
    min-width: 0;
}

.disc-primary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 4px;
}

.disc-primary-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.disc-primary-tagline {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

.disc-primary-score-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.disc-primary-score-fill {
    height: 100%;
    background: var(--disc-type-color, #2ecc71);
    border-radius: 10px;
    transition: width 1s ease;
}

.disc-primary-score-text {
    font-size: 12px;
    color: #888;
}

/* --- Description Card --- */
.disc-desc-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.disc-desc-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.disc-desc-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.disc-traits {
    display: flex;
    gap: 20px;
}

.disc-traits-col {
    flex: 1;
}

.disc-traits-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.disc-traits-col ul {
    list-style: none;
    padding: 0;
}

.disc-traits-col ul li {
    font-size: 13px;
    color: #555;
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    border-bottom: 1px solid #f5f5f5;
}

.disc-traits-col ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #aaa;
}

/* --- Scores Card --- */
.disc-scores-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.disc-scores-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.disc-scores-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.disc-score-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.disc-score-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    font-weight: 500;
}

.disc-score-emoji {
    font-size: 16px;
}

.disc-badge-primary {
    background: #2e7d4f;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: auto;
}

.disc-score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.disc-score-bar-bg {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.disc-score-bar-inner {
    height: 100%;
    border-radius: 10px;
    transition: width 1.2s ease;
}

.disc-score-pct {
    font-size: 12px;
    color: #888;
    width: 42px;
    text-align: right;
    flex-shrink: 0;
}

.disc-score-row.disc-score-primary .disc-score-label {
    font-weight: 700;
    color: #1a1a2e;
}

/* --- Share Card --- */
.disc-share-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.disc-share-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.disc-share-card p {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

.disc-share-url {
    display: flex;
    gap: 8px;
}

.disc-share-url input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    background: #fafafa;
    outline: none;
    min-width: 0;
}

.disc-btn-copy {
    padding: 10px 18px;
    background: #2e7d4f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.disc-btn-copy:hover {
    background: #256040;
}

/* --- Footer --- */
.disc-results-footer {
    text-align: center;
    margin-top: 24px;
}

.disc-btn-retake {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid #2e7d4f;
    color: #2e7d4f;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.disc-btn-retake:hover {
    background: #2e7d4f;
    color: #fff;
}

/* ============================================================
   ACCESS GATE
   ============================================================ */
.disc-results-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.disc-gate-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f4f6f8;
}

.disc-gate-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.disc-gate-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.disc-gate-box h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.disc-gate-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.disc-gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.disc-gate-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    color: #333;
}

.disc-gate-form input:focus {
    border-color: #2e7d4f;
}

.disc-gate-error {
    color: #e53935;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .disc-primary-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .disc-primary-badge {
        font-size: 56px;
    }
    .disc-primary-name {
        font-size: 18px;
    }
    .disc-traits {
        flex-direction: column;
    }
    .disc-radio-circle {
        width: 34px;
        height: 34px;
    }
    .disc-radio-label input[type="radio"]:checked + .disc-radio-circle::after {
        font-size: 15px;
    }
    .disc-share-url {
        flex-direction: column;
    }
    .disc-results-wrap {
        padding: 16px 12px 48px;
    }
}

/* ============================================================
   PIE CHART CARD
   ============================================================ */
.disc-chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.disc-chart-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.disc-chart-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

#disc-pie-chart {
    border-radius: 50%;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.13));
    max-width: 240px;
    max-height: 240px;
    width: 240px !important;
    height: 240px !important;
}

.disc-chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    min-width: 220px;
}

.disc-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #444;
    line-height: 1.4;
}

.disc-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
}

.disc-legend-text strong {
    font-size: 11px;
    color: #222;
}

.disc-legend-pct {
    font-weight: 700;
    font-size: 13px;
    color: #333;
}

/* Error highlight card */
.disc-card-error {
    border: 2px solid #e53935 !important;
    background: #fff8f8 !important;
    transition: border 0.2s, background 0.2s;
}

@media (max-width: 520px) {
    .disc-chart-wrap {
        flex-direction: column;
        gap: 20px;
    }
    .disc-chart-legend {
        grid-template-columns: 1fr 1fr;
        min-width: unset;
        width: 100%;
    }
}

/* ============================================================
   BACK BUTTON  (< icon, top-left of scale header)
   ============================================================ */
.disc-scale-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.disc-btn-back {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    background: #fff;
    color: #666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 0;
    /* push title to center visually */
    margin-right: 0;
}

.disc-btn-back:hover {
    border-color: #2e7d4f;
    color: #2e7d4f;
    background: #f0faf4;
    box-shadow: 0 2px 8px rgba(46,125,79,0.13);
}

.disc-btn-back:active {
    transform: scale(0.94);
}

/* Title stays centered even with back button */
.disc-scale-header-top .disc-scale-title {
    flex: 1;
    margin-bottom: 0;   /* override old margin, handled by parent gap */
    text-align: center;
}

/* Offset spacer: mirrors the back button width so title stays centered */
.disc-scale-labels-offset {
    flex: 0 0 44px;    /* same width as back button */
    min-width: 44px;
}

/* When back button hidden: no offset needed */
#disc-btn-back[style*="display: none"] ~ .disc-scale-title,
#disc-btn-back[style*="display:none"] ~ .disc-scale-title {
    text-align: center;
}

@media (min-width: 768px) {
    .disc-quiz-container  {
        max-width: 50%;
    }
}
@media (min-width: 1440px) {
    .disc-quiz-container  {
        max-width: 66.666667%;
    }
}
@media (max-width: 600px) {
    .disc-quiz-container  {
        max-width: 100%;
    }
}