/* =========================================================
   Personality Test Challenge — pt_style.css
   All custom pt-* components + overrides
   ========================================================= */

/* ---------- Base ---------- */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--theme-body-bg, #f4f7fb);
    color: var(--theme-text, #222);
}

/* ---------- Hero banner ---------- */
.pt-hero {
    background: linear-gradient(135deg, var(--theme-primary, #7c3aed) 0%, var(--theme-secondary, #ec4899) 100%);
    color: #fff;
    padding: 3rem 1rem;
}
.pt-hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}
.pt-hero-sub {
    font-size: 1.05rem;
    opacity: .92;
    margin-bottom: 0;
}

/* ---------- How-it-works steps ---------- */
.pt-how-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1.25rem 0;
}
.pt-step {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: var(--theme-card-bg, #fff);
    border-radius: 12px;
    padding: .7rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    min-width: 160px;
}
.pt-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #ec4899));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pt-step-text { font-size: .82rem; line-height: 1.35; }
.pt-step-arrow { font-size: 1.4rem; color: var(--theme-primary, #7c3aed); }

/* ---------- Card ---------- */
.pt-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
}
.pt-card-header {
    background: linear-gradient(135deg, var(--theme-primary, #7c3aed) 0%, var(--theme-secondary, #ec4899) 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
}
.pt-card-header h3, .pt-card-header h4 { margin-bottom: .25rem; font-weight: 700; }
.pt-card-header p { opacity: .9; margin-bottom: 0; }
.pt-card-body { padding: 1.5rem; }

/* ---------- Step badge ---------- */
.pt-step-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 20px;
    padding: .2rem .7rem;
    margin-bottom: .5rem;
    letter-spacing: .05em;
}

/* ---------- Form inputs ---------- */
.pt-label { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; display: block; }
.pt-input {
    border-radius: 10px !important;
    border: 1.5px solid #e0e0e0 !important;
    padding: .6rem 1rem !important;
    font-size: .95rem;
    transition: border-color .2s;
}
.pt-input:focus {
    border-color: var(--theme-primary, #7c3aed) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12) !important;
}

/* ---------- Buttons ---------- */
.pt-btn-primary {
    background: linear-gradient(135deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #ec4899));
    color: #fff !important;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    transition: opacity .2s, transform .15s;
}
.pt-btn-primary:hover { opacity: .88; transform: translateY(-1px); color: #fff !important; }
.pt-btn-secondary {
    background: var(--theme-card-bg, #fff);
    color: var(--theme-primary, #7c3aed) !important;
    border: 2px solid var(--theme-primary, #7c3aed);
    border-radius: 30px;
    font-weight: 600;
    transition: all .2s;
}
.pt-btn-secondary:hover {
    background: var(--theme-primary, #7c3aed);
    color: #fff !important;
}
.pt-btn-whatsapp {
    background: #25d366;
    color: #fff !important;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    padding: .5rem 1.2rem;
    transition: opacity .2s;
}
.pt-btn-whatsapp:hover { opacity: .85; color: #fff !important; }
.pt-btn-facebook {
    background: #1877f2;
    color: #fff !important;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    padding: .5rem 1.2rem;
    transition: opacity .2s;
}
.pt-btn-facebook:hover { opacity: .85; color: #fff !important; }

/* ---------- Trait slider rows ---------- */
.pt-trait-row {
    padding: .85rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.pt-trait-row:last-child { border-bottom: none; }
.pt-trait-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
}
.pt-trait-emoji { font-size: 1.3rem; flex-shrink: 0; }
.pt-trait-name  { font-weight: 600; font-size: .9rem; flex: 1; line-height: 1.35; word-break: break-word; }
.pt-trait-value {
    font-weight: 700;
    font-size: .9rem;
    min-width: 28px;
    text-align: center;
    border-radius: 20px;
    padding: .15rem .5rem;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
}
.pt-trait-value.badge-low  { background: #ef4444; }
.pt-trait-value.badge-mid  { background: #f59e0b; }
.pt-trait-value.badge-high { background: #10b981; }

.pt-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--theme-primary, #7c3aed) 0%, var(--theme-primary, #7c3aed) 50%, #e0e0e0 50%);
    outline: none;
    cursor: pointer;
    margin: .3rem 0;
}
.pt-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #ec4899));
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    border: 2px solid #fff;
}
.pt-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #ec4899));
    cursor: pointer;
    border: 2px solid #fff;
}
.pt-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: #999;
    margin-top: .1rem;
}

/* ---------- Progress dots ---------- */
.pt-progress-dots { display: flex; justify-content: center; gap: .5rem; padding: .5rem 0; }
.pt-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    transition: background .3s;
}
.pt-dot.active { background: var(--theme-primary, #7c3aed); }

/* ---------- Share link box ---------- */
.pt-share-link-box {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.pt-share-buttons {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---------- Archetype banner ---------- */
.pt-archetype-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    border: 2px solid #fbbf24;
}
.pt-archetype-emoji { font-size: 3rem; margin-bottom: .5rem; }
.pt-archetype-name  { font-size: 1.4rem; font-weight: 700; color: #92400e; margin-bottom: .25rem; }
.pt-archetype-desc  { font-size: .95rem; color: #78350f; }

/* ---------- Score meter ---------- */
.pt-score-meter-wrap { position: relative; display: inline-block; margin: 1rem auto; }
.pt-score-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(var(--theme-primary, #7c3aed) var(--score-deg, 0deg), #e9ecef var(--score-deg, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    position: relative;
}
.pt-score-inner {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--theme-card-bg, #fff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pt-score-num  { font-size: 1.8rem; font-weight: 800; color: var(--theme-primary, #7c3aed); line-height: 1; }
.pt-score-denom { font-size: .75rem; color: #999; }

/* ---------- Shared bar colours ---------- */
.pt-bar-self   { background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #ec4899)); }
.pt-bar-friend { background: linear-gradient(90deg, #10b981, #34d399); }

/* ---------- Question row (used on ALL pages) ----------
   Label (question text) sits above the bar group so long
   questions never get clipped or squashed on narrow screens. */
.pt-q-row {
    padding: .85rem 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.pt-q-row:last-child { border-bottom: none; }

.pt-q-label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: .45rem;
    line-height: 1.4;
    word-break: break-word;
}
.pt-q-label-emoji { flex-shrink: 0; font-size: 1.2rem; margin-top: .05rem; }

/* Single bar row (creator self-rating / share page summary) */
.pt-q-bar-row {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.pt-q-bar-tag {
    font-size: .72rem;
    color: #666;
    min-width: 52px;
    flex-shrink: 0;
    text-align: right;
}
.pt-q-bar-wrap {
    flex: 1;
    position: relative;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}
.pt-q-bar-fill {
    height: 100%;
    border-radius: 5px;
    position: absolute;
    left: 0; top: 0;
    transition: width .65s ease;
}
.pt-q-bar-val {
    font-size: .82rem;
    font-weight: 700;
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* Diff badge inside friend cards */
.pt-q-diff {
    font-size: .75rem;
    font-weight: 700;
    min-width: 34px;
    text-align: right;
    flex-shrink: 0;
}

/* ---------- Legacy aliases kept for backward compat ---------- */
.pt-result-trait-row  { padding: .6rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.pt-result-trait-row:last-child { border-bottom: none; }
.pt-result-bar-wrap   { flex: 1; position: relative; height: 10px; background: #eee; border-radius: 5px; overflow: hidden; }
.pt-result-bar        { height: 100%; border-radius: 5px; position: absolute; left: 0; top: 0; transition: width .6s ease; }
.pt-result-score      { font-weight: 700; font-size: .85rem; min-width: 38px; text-align: right; flex-shrink: 0; }

/* ---------- Comparison bar group (results page, 2 bars per question) ---------- */
.pt-compare-row       { padding: .75rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.pt-compare-row:last-child { border-bottom: none; }
.pt-compare-label     { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; display: flex; align-items: flex-start; gap: .4rem; line-height: 1.4; word-break: break-word; }
.pt-compare-bar-group { display: flex; flex-direction: column; gap: .25rem; }
.pt-compare-bar-item  { display: flex; align-items: center; gap: .5rem; }
.pt-compare-bar-label { font-size: .73rem; color: #666; min-width: 52px; flex-shrink: 0; text-align: right; }
.pt-compare-bar-wrap  { flex: 1; height: 10px; background: #eee; border-radius: 5px; overflow: hidden; position: relative; }
.pt-compare-bar-fill  { height: 100%; border-radius: 5px; position: absolute; left: 0; top: 0; transition: width .65s ease; }
.pt-compare-bar-val   { font-size: .75rem; font-weight: 700; min-width: 32px; }

/* ---------- Individual friend card ---------- */
.pt-friend-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
}
.pt-friend-header {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #fff;
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pt-friend-name { font-weight: 700; font-size: 1.05rem; }
.pt-friend-score-badge {
    background: rgba(255,255,255,.25);
    border-radius: 20px;
    padding: .2rem .8rem;
    font-weight: 700;
    font-size: .9rem;
}
.pt-friend-body { padding: 1rem 1.25rem; }
/* Each friend trait row: question text sits above the bar so long questions wrap cleanly */
.pt-friend-trait-row  { padding: .55rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.pt-friend-trait-row:last-child { border-bottom: none; }
.pt-friend-trait-q    { display: flex; align-items: flex-start; gap: .45rem; font-size: .85rem; font-weight: 600; line-height: 1.35; margin-bottom: .3rem; word-break: break-word; }
.pt-friend-trait-q-emoji { flex-shrink: 0; }
.pt-friend-trait-bar-row  { display: flex; align-items: center; gap: .5rem; }
.pt-friend-trait-name { flex: 1; }
.pt-friend-trait-val  { font-weight: 700; font-size: .82rem; min-width: 32px; text-align: right; flex-shrink: 0; }
.pt-friend-trait-bar-wrap { flex: 1; height: 7px; background: #eee; border-radius: 3px; overflow: hidden; position: relative; }
.pt-friend-trait-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #ec4899)); position: absolute; left: 0; top: 0; }

/* ---------- Gender icons ---------- */
.pt-gender-male    { color: #3b82f6; }
.pt-gender-female  { color: #ec4899; }
.pt-gender-other   { color: #8b5cf6; }

/* ---------- Ad section ---------- */
.pt-ad-section { padding: 1rem 0; text-align: center; }
.pt-ad-label { font-size: .75rem; color: #aaa; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
    .pt-hero-title  { font-size: 1.4rem; }
    .pt-step        { min-width: 120px; }
    .pt-step-arrow  { display: none; }
    .pt-result-trait-label { min-width: 100px; max-width: 100px; font-size: .78rem; }
    .pt-archetype-banner { padding: 1.25rem 1rem; }
    .pt-share-link-box { flex-direction: column; }
    .pt-share-link-box .form-control { width: 100%; }
}
