/* Quiz DISC Pro - Liquid Glass Design */

:root {
    --qdp-primary: #007AFF;
    --qdp-success: #34C759;
    --qdp-warning: #FF9500;
    --qdp-danger: #FF3B30;
    --qdp-purple: #AF52DE;
    --qdp-yellow: #FFCC00;
    --qdp-bg: #f5f5f7;
    --qdp-text: rgba(0,0,0,0.85);
    --qdp-text-secondary: rgba(0,0,0,0.5);
    --qdp-card-bg: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 100%);
    --qdp-glass-shadow: 0 0 0 0.5px rgba(0,0,0,0.03), 0 4px 24px rgba(0,0,0,0.06), inset 0 1px 1px rgba(255,255,255,0.9);
    --qdp-radius: 24px;
    
    /* Typography defaults - will be overridden by JS */
    --qdp-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --qdp-font-size-question: 18px;
    --qdp-font-size-answer: 15px;
    --qdp-font-size-result-title: 24px;
    --qdp-font-size-result-subtitle: 16px;
    --qdp-font-size-label: 13px;
    --qdp-font-size-body: 14px;
    --qdp-font-weight-headers: 600;
    --qdp-line-height: 1.6;
    
    /* DISC Colors */
    --qdp-d: #FF3B30;
    --qdp-i: #FFCC00;
    --qdp-s: #34C759;
    --qdp-c: #007AFF;
}

/* Base container */
#qdp-quiz-container {
    font-family: var(--qdp-font-family);
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
    line-height: var(--qdp-line-height);
}

/* Standalone mode - full page experience */
#qdp-quiz-container.qdp-standalone {
    background: var(--qdp-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Embedded mode - integrates with page content */
#qdp-quiz-container.qdp-embedded {
    background: transparent;
    min-height: auto;
    padding: 20px 16px;
    margin: 20px auto;
}

#qdp-quiz-container.qdp-embedded .qdp-glass-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}

/* Language Switch */
.qdp-lang-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

/* Inline language switch (under title) */
.qdp-lang-switch.qdp-lang-switch-inline {
    margin-bottom: 20px;
    margin-top: 0;
}

.qdp-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--qdp-text-secondary);
    transition: all 0.2s;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.qdp-lang-btn:hover {
    background: rgba(0,0,0,0.08);
}

.qdp-lang-btn.active {
    background: var(--qdp-primary);
    color: #fff;
    box-shadow: none;
}

.qdp-flag {
    font-size: 18px;
}

/* Glass Card */
.qdp-glass-card {
    background: var(--qdp-card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--qdp-radius);
    padding: 24px;
    box-shadow: var(--qdp-glass-shadow);
}

/* Quiz Card */
.qdp-quiz {
    background: var(--qdp-card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--qdp-radius);
    box-shadow: var(--qdp-glass-shadow);
    overflow: hidden;
}

/* Progress */
.qdp-progress {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px 24px;
}

.qdp-progress-dot {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.qdp-progress-dot.done,
.qdp-progress-dot.active {
    width: 24px;
    background: var(--qdp-primary);
}

.qdp-progress-dot.pending {
    width: 6px;
    background: rgba(0,0,0,0.1);
}

/* Question */
.qdp-question-wrap {
    padding: 0 24px 24px;
}

.qdp-question-header {
    text-align: center;
    margin-bottom: 24px;
}

.qdp-q-number {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0,0,0,0.04);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--qdp-text-secondary);
    margin-bottom: 16px;
}

.qdp-q-title {
    font-size: var(--qdp-font-size-question);
    font-weight: var(--qdp-font-weight-headers);
    color: var(--qdp-text);
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

/* Answers - Icon + Fill Style */
.qdp-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qdp-answer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0,0,0,0.03);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.06);
}

.qdp-answer:hover {
    transform: scale(1.01);
    background: rgba(0,0,0,0.05);
}

.qdp-answer.selected {
    background: linear-gradient(135deg, var(--qdp-primary) 0%, #0055D4 100%);
    box-shadow: 0 4px 20px rgba(0,122,255,0.3), inset 0 1px 1px rgba(255,255,255,0.2);
    transform: scale(1.02);
}

.qdp-answer-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: rgba(0,0,0,0.05);
    color: rgba(0,0,0,0.4);
}

.qdp-answer.selected .qdp-answer-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.qdp-answer-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.qdp-answer-text {
    font-size: var(--qdp-font-size-answer);
    font-weight: 500;
    color: rgba(0,0,0,0.7);
    flex: 1;
    line-height: 1.4;
}

.qdp-answer.selected .qdp-answer-text {
    color: #fff;
}

.qdp-answer-check {
    width: 20px;
    height: 20px;
    display: none;
    color: rgba(255,255,255,0.8);
}

.qdp-answer.selected .qdp-answer-check {
    display: block;
}

/* Continue Button */
.qdp-nav {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: center;
}

.qdp-btn-continue {
    padding: 14px 32px;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.3);
}

.qdp-btn-continue.active {
    background: linear-gradient(135deg, var(--qdp-primary) 0%, #0055D4 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,122,255,0.35);
}

.qdp-btn-continue.active:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0,122,255,0.4);
}

/* ======================= */
/* RESULT PAGE */
/* ======================= */

.qdp-result {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tag Card Header */
.qdp-result-header {
    background: var(--qdp-card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--qdp-radius);
    padding: 24px;
    box-shadow: var(--qdp-glass-shadow);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.qdp-result-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(52,199,89,0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* Tag Card Badge */
.qdp-tag-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(52,199,89,0.35);
    min-width: 320px;
}

.qdp-tag-card.qdp-group-dominant { background: linear-gradient(135deg, #FF3B30 0%, #D63030 100%); box-shadow: 0 8px 32px rgba(255,59,48,0.35); }
.qdp-tag-card.qdp-group-influent { background: linear-gradient(135deg, #FFCC00 0%, #E6B800 100%); box-shadow: 0 8px 32px rgba(255,204,0,0.35); }
.qdp-tag-card.qdp-group-steady, .qdp-tag-card.qdp-group-statornic { background: linear-gradient(135deg, #34C759 0%, #28a745 100%); box-shadow: 0 8px 32px rgba(52,199,89,0.35); }
.qdp-tag-card.qdp-group-conscientious, .qdp-tag-card.qdp-group-constiincios { background: linear-gradient(135deg, #007AFF 0%, #0055D4 100%); box-shadow: 0 8px 32px rgba(0,122,255,0.35); }
.qdp-tag-card.qdp-group-dual { background: linear-gradient(135deg, #34C759 0%, #28a745 100%); box-shadow: 0 8px 32px rgba(52,199,89,0.35); }

.qdp-tag-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qdp-tag-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
    stroke-width: 2;
}

.qdp-tag-text {
    text-align: left;
}

.qdp-tag-name {
    font-size: 20px;
    color: #fff;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
}

.qdp-tag-name .letter {
    font-size: 28px;
    font-weight: 800;
}

.qdp-tag-name .rest {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
}

.qdp-tag-name .separator {
    margin: 0 8px;
    opacity: 0.5;
    font-weight: 300;
}

.qdp-tag-label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Profile Title */
.qdp-result-title {
    font-size: var(--qdp-font-size-result-title);
    font-weight: var(--qdp-font-weight-headers);
    color: var(--qdp-text);
    margin: 0 0 4px;
}

.qdp-result-subtitle {
    font-size: var(--qdp-font-size-result-subtitle);
    color: var(--qdp-text-secondary);
    margin: 0;
}

/* Circular Scores */
.qdp-scores-circular {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
}

.qdp-score-circle {
    text-align: center;
}

.qdp-score-circle-wrap {
    position: relative;
    width: 64px;
    height: 64px;
}

.qdp-score-circle-svg {
    width: 64px;
    height: 64px;
    transform: rotate(-90deg);
}

.qdp-score-circle-bg {
    fill: none;
    stroke: rgba(0,0,0,0.05);
    stroke-width: 6;
}

.qdp-score-circle-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 0.7s ease;
}

.qdp-score-circle-fill.d { stroke: var(--qdp-d); }
.qdp-score-circle-fill.i { stroke: var(--qdp-i); }
.qdp-score-circle-fill.s { stroke: var(--qdp-s); }
.qdp-score-circle-fill.c { stroke: var(--qdp-c); }

.qdp-score-circle-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
    color: rgba(0,0,0,0.7);
}

.qdp-score-circle-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(0,0,0,0.6);
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.qdp-score-circle-rest {
    font-size: 10px;
    font-weight: 500;
    color: rgba(0,0,0,0.4);
    text-transform: lowercase;
}

/* Info Cards Grid */
.qdp-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.qdp-info-card {
    background: var(--qdp-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04), inset 0 1px 1px rgba(255,255,255,0.8);
}

.qdp-info-card.full-width {
    grid-column: 1 / -1;
}

.qdp-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.qdp-info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qdp-info-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.qdp-info-icon.success { background: rgba(52,199,89,0.1); color: var(--qdp-success); }
.qdp-info-icon.warning { background: rgba(255,149,0,0.1); color: var(--qdp-warning); }
.qdp-info-icon.primary { background: rgba(0,122,255,0.1); color: var(--qdp-primary); }
.qdp-info-icon.purple { background: rgba(175,82,222,0.1); color: var(--qdp-purple); }
.qdp-info-icon.yellow { background: rgba(255,204,0,0.15); color: #997A00; }
.qdp-info-icon.purple { background: rgba(147,51,234,0.15); color: #7C3AED; }
.qdp-info-icon.danger { background: rgba(255,59,48,0.1); color: var(--qdp-danger); }
.qdp-info-icon.info { background: rgba(90,200,250,0.15); color: #5AC8FA; }

/* Patient Phrases Card */
.qdp-patient-phrases-card {
    background: linear-gradient(135deg, rgba(90,200,250,0.05) 0%, rgba(0,122,255,0.05) 100%);
    border-left: 3px solid #5AC8FA;
}

.qdp-patient-phrases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 8px;
}

.qdp-patient-phrase-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--qdp-text);
}

.qdp-phrase-bullet {
    color: #5AC8FA;
    font-weight: bold;
    flex-shrink: 0;
}

.qdp-phrase-text {
    flex: 1;
}

.qdp-vestimentatie-card {
    background: linear-gradient(135deg, rgba(147,51,234,0.05) 0%, rgba(236,72,153,0.05) 100%);
}

.qdp-vestimentatie-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--qdp-text);
    padding: 0 8px;
}

.qdp-vestimentatie-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qdp-vestimentatie-item {
    font-size: 14px;
    line-height: 1.6;
    color: var(--qdp-text);
    padding-left: 20px;
    position: relative;
}

.qdp-vestimentatie-item::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--qdp-purple);
    font-weight: bold;
}

/* Why Left Card */
.qdp-why-left-card {
    background: linear-gradient(135deg, rgba(255,59,48,0.05) 0%, rgba(255,149,0,0.05) 100%);
    border-left: 3px solid var(--qdp-danger);
}

.qdp-why-left-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--qdp-text);
    padding: 0 8px;
}

/* Return Strategy Card */
.qdp-return-strategy-card {
    background: linear-gradient(135deg, rgba(52,199,89,0.05) 0%, rgba(0,199,190,0.05) 100%);
    border-left: 3px solid var(--qdp-success);
}

.qdp-return-strategy-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--qdp-text);
    padding: 0 8px;
}

.qdp-info-title {
    font-size: var(--qdp-font-size-label);
    font-weight: var(--qdp-font-weight-headers);
    color: rgba(0,0,0,0.7);
}

.qdp-info-text {
    font-size: var(--qdp-font-size-body);
    color: rgba(0,0,0,0.6);
    line-height: var(--qdp-line-height);
    margin: 0;
}

/* Scenarios */
.qdp-scenarios-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qdp-scenario-item {
    display: flex;
    gap: 12px;
}

.qdp-scenario-bar {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.qdp-scenario-bar.primary { background: var(--qdp-primary); }
.qdp-scenario-bar.success { background: var(--qdp-success); }

.qdp-scenario-content {
    flex: 1;
}

.qdp-scenario-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.qdp-scenario-label.primary { color: var(--qdp-primary); }
.qdp-scenario-label.success { color: var(--qdp-success); }

.qdp-scenario-text {
    font-size: 14px;
    color: rgba(0,0,0,0.6);
    line-height: 1.5;
    margin: 0;
}

/* Keywords Vertical */
.qdp-keywords-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qdp-keyword-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0,122,255,0.05);
    border-radius: 12px;
}

.qdp-keyword-quote {
    color: rgba(0,122,255,0.4);
    flex-shrink: 0;
}

.qdp-keyword-quote svg {
    width: 16px;
    height: 16px;
}

.qdp-keyword-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--qdp-primary);
}

/* Action Buttons */
.qdp-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.qdp-btn-restart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: linear-gradient(135deg, var(--qdp-primary) 0%, #0055D4 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,122,255,0.35);
}

.qdp-btn-restart:hover {
    transform: scale(1.02);
}

.qdp-btn-restart svg {
    width: 20px;
    height: 20px;
}

.qdp-btn-download {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: rgba(52,199,89,0.1);
    color: var(--qdp-success);
}

.qdp-btn-download:hover {
    transform: scale(1.05);
    background: rgba(52,199,89,0.15);
}

.qdp-btn-download svg {
    width: 20px;
    height: 20px;
}

.qdp-btn-pwa-install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(0,122,255,0.08) 0%, rgba(88,86,214,0.08) 100%);
    border: 1px solid rgba(0,122,255,0.2);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #007AFF;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qdp-btn-pwa-install:hover {
    background: linear-gradient(135deg, rgba(0,122,255,0.15) 0%, rgba(88,86,214,0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
}

.qdp-btn-pwa-install svg {
    width: 18px;
    height: 18px;
}

.qdp-btn-pwa-install.installing {
    background: linear-gradient(135deg, rgba(255,149,0,0.1) 0%, rgba(255,204,0,0.1) 100%);
    border-color: rgba(255,149,0,0.3);
    color: #FF9500;
    pointer-events: none;
}

.qdp-btn-pwa-install.installed {
    background: linear-gradient(135deg, rgba(52,199,89,0.1) 0%, rgba(0,199,190,0.1) 100%);
    border-color: rgba(52,199,89,0.3);
    color: #34C759;
    pointer-events: none;
}

/* Install Section (below main actions) */
.qdp-install-section {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.qdp-install-section .qdp-btn-pwa-install {
    width: auto;
    padding: 10px 24px;
    font-size: 13px;
}

/* ======================= */
/* INTRO SCREEN */
/* ======================= */

.qdp-intro {
    text-align: center;
    padding: 32px 24px;
}

/* When has banner, remove top padding */
.qdp-intro.has-banner {
    padding-top: 0;
}

.qdp-intro-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(0,122,255,0.1) 0%, rgba(0,122,255,0.05) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qdp-intro-icon svg {
    width: 36px;
    height: 36px;
    color: var(--qdp-primary);
}

.qdp-intro-banner {
    margin: 0 -24px 24px -24px;
    text-align: center;
    overflow: hidden;
    border-radius: var(--qdp-radius) var(--qdp-radius) 0 0;
    position: relative;
}

.qdp-intro-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
}

/* Overlay for title and lang switch over banner - centered, no gradient */
.qdp-banner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 24px;
    text-align: center;
}

.qdp-banner-overlay .qdp-intro-title {
    color: #1d1d1f;
    margin-bottom: 16px;
}

.qdp-banner-overlay .qdp-lang-switch-inline {
    margin-bottom: 0;
}

.qdp-banner-overlay .qdp-lang-btn {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qdp-banner-overlay .qdp-lang-btn:hover {
    background: rgba(255,255,255,1);
}

.qdp-banner-overlay .qdp-lang-btn.active {
    background: var(--qdp-primary);
    color: #fff;
}

.qdp-intro-title {
    font-size: var(--qdp-font-size-result-title);
    font-weight: var(--qdp-font-weight-headers);
    color: var(--qdp-text);
    margin: 0 0 16px;
    letter-spacing: -0.3px;
}

.qdp-intro-text {
    font-size: var(--qdp-font-size-body);
    line-height: var(--qdp-line-height);
    color: var(--qdp-text-secondary);
    margin: 0 0 28px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.qdp-intro-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.qdp-form-row {
    display: flex;
    gap: 12px;
}

.qdp-form-row .qdp-form-name {
    flex: 1;
}

.qdp-form-row .qdp-form-age {
    width: 100px;
    flex-shrink: 0;
}

.qdp-gender-buttons {
    display: flex;
    gap: 12px;
}

.qdp-gender-btn {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--qdp-font-family);
    border: none;
    border-radius: 14px;
    background: rgba(0,0,0,0.04);
    color: var(--qdp-text);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.qdp-gender-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.5;
}

.qdp-gender-btn span {
    font-size: 15px;
}

.qdp-gender-btn:hover {
    background: rgba(0,0,0,0.06);
}

.qdp-gender-btn.selected {
    background: var(--qdp-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

.qdp-form-group {
    text-align: left;
}

.qdp-form-label {
    display: block;
    font-size: var(--qdp-font-size-label);
    font-weight: var(--qdp-font-weight-headers);
    color: var(--qdp-text);
    margin-bottom: 8px;
}

.qdp-form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: var(--qdp-font-size-answer);
    font-family: var(--qdp-font-family);
    border: none;
    border-radius: 12px;
    background: rgba(0,0,0,0.04);
    color: var(--qdp-text);
    transition: all 0.2s;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    box-sizing: border-box;
}

.qdp-form-input:focus {
    outline: none;
    background: rgba(0,122,255,0.04);
    box-shadow: inset 0 0 0 2px var(--qdp-primary);
}

.qdp-form-input::placeholder {
    color: rgba(0,0,0,0.3);
}

.qdp-btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--qdp-font);
    border: none;
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.3);
}

.qdp-btn-start svg {
    width: 20px;
    height: 20px;
}

.qdp-btn-start.active {
    background: linear-gradient(135deg, var(--qdp-primary) 0%, #0055D4 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,122,255,0.35);
}

.qdp-btn-start.active:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 28px rgba(0,122,255,0.4);
}

/* Patient Name - Simple, below tag card */
.qdp-patient-name-simple {
    font-size: 20px;
    font-weight: 600;
    color: var(--qdp-text);
    margin-bottom: 20px;
}

.qdp-patient-age {
    font-weight: 400;
    color: var(--qdp-text-muted, #86868b);
    font-size: 16px;
}

/* Responsive */
@media (max-width: 500px) {
    #qdp-quiz-container {
        padding: 12px;
    }
    
    .qdp-quiz,
    .qdp-result-header,
    .qdp-info-card {
        border-radius: 20px;
    }
    
    .qdp-q-title {
        font-size: 18px;
    }
    
    .qdp-answer {
        padding: 14px;
    }
    
    .qdp-answer-icon {
        width: 36px;
        height: 36px;
    }
    
    .qdp-info-grid {
        gap: 10px;
    }
    
    .qdp-scores-circular {
        gap: 12px;
    }
    
    .qdp-score-circle-wrap,
    .qdp-score-circle-svg {
        width: 56px;
        height: 56px;
    }
    
    .qdp-score-circle-value {
        font-size: 12px;
    }
}

/* ====================================
   iOS Install Prompt Modal
   ==================================== */
.qdp-ios-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.qdp-ios-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qdp-ios-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 24px;
    max-width: 380px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.qdp-ios-modal-overlay.active .qdp-ios-modal {
    transform: scale(1) translateY(0);
}

.qdp-ios-modal-header {
    text-align: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.qdp-ios-modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.qdp-ios-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 8px;
}

.qdp-ios-modal-header p {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    margin: 0;
    line-height: 1.4;
}

.qdp-ios-modal-content {
    padding: 20px 24px;
}

.qdp-ios-gif {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qdp-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qdp-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #1d1d1f;
    padding: 12px 16px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 12px;
}

.qdp-step-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.qdp-ios-modal-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
}

.qdp-ios-btn-later,
.qdp-ios-btn-close {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.qdp-ios-btn-later {
    background: rgba(0, 0, 0, 0.06);
    color: #1d1d1f;
}

.qdp-ios-btn-later:hover {
    background: rgba(0, 0, 0, 0.1);
}

.qdp-ios-btn-close {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
}

.qdp-ios-btn-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

/* Visual Demo (animated icons showing install steps) */
.qdp-ios-visual-demo {
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    border-radius: 16px;
    padding: 24px 12px;
    margin-bottom: 20px;
}

.qdp-ios-visual-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qdp-visual-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.qdp-visual-icon {
    width: 52px;
    height: 52px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #007AFF;
    transition: all 0.3s ease;
}

.qdp-visual-step span {
    font-size: 11px;
    color: rgba(0,0,0,0.5);
    font-weight: 600;
}

.qdp-visual-arrow {
    font-size: 18px;
    color: rgba(0,0,0,0.25);
    margin-top: -16px;
}

/* Pulse animation for first step */
.qdp-animate-pulse {
    animation: qdp-pulse 2s ease-in-out infinite;
}

@keyframes qdp-pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    }
    50% { 
        transform: scale(1.08); 
        box-shadow: 0 4px 20px rgba(0,122,255,0.35);
        background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
        color: white;
    }
}

/* Sequential highlight animation */
.qdp-visual-step:nth-child(1) .qdp-visual-icon { animation-delay: 0s; }
.qdp-visual-step:nth-child(3) .qdp-visual-icon { animation: qdp-pulse 2s ease-in-out infinite 0.5s; }
.qdp-visual-step:nth-child(5) .qdp-visual-icon { animation: qdp-pulse 2s ease-in-out infinite 1s; }

/* iOS Install Button (optional trigger) */
.qdp-ios-install-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #007AFF;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.qdp-ios-install-btn:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(88, 86, 214, 0.15));
}

/* Only show on iOS Safari */
@supports (-webkit-touch-callout: none) {
    .qdp-ios-install-btn {
        display: flex;
    }
}

/* ======================= */
/* PWA STANDALONE MODE */
/* ======================= */
/* Hide page content except quiz when running as installed PWA */

@media (display-mode: standalone) {
    /* Hide and collapse common elements */
    header, .site-header, #header, #masthead,
    footer, .site-footer, #footer, #colophon,
    .nav-header, .navbar, #wpadminbar,
    .rev_slider_wrapper, rs-module-wrap, .rs-fullwidth-wrap,
    [class*="rev_slider"], .rev_slider, #rev_slider,
    .rs-module, rs-module, .wpb_revslider_element,
    .slider-wrapper, .home-slider, .main-slider {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: hidden !important;
    }
    
    /* Also target parent containers that might hold sliders */
    .rev_slider_wrapper *,
    rs-module-wrap *,
    .rs-fullwidth-wrap * {
        display: none !important;
    }
    
    #qdp-quiz-container {
        min-height: 100vh !important;
        padding-top: env(safe-area-inset-top, 16px) !important;
    }
    
    body, html {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html {
        margin-top: 0 !important;
    }
}

/* iOS PWA standalone mode (using JS-added class) */
body.qdp-pwa-standalone header,
body.qdp-pwa-standalone .site-header,
body.qdp-pwa-standalone #header,
body.qdp-pwa-standalone #masthead,
body.qdp-pwa-standalone footer,
body.qdp-pwa-standalone .site-footer,
body.qdp-pwa-standalone #footer,
body.qdp-pwa-standalone #colophon,
body.qdp-pwa-standalone .nav-header,
body.qdp-pwa-standalone .navbar,
body.qdp-pwa-standalone #wpadminbar,
body.qdp-pwa-standalone .rev_slider_wrapper,
body.qdp-pwa-standalone rs-module-wrap,
body.qdp-pwa-standalone .rs-fullwidth-wrap,
body.qdp-pwa-standalone [class*="rev_slider"],
body.qdp-pwa-standalone .rev_slider,
body.qdp-pwa-standalone #rev_slider,
body.qdp-pwa-standalone .rs-module,
body.qdp-pwa-standalone rs-module,
body.qdp-pwa-standalone .wpb_revslider_element,
body.qdp-pwa-standalone .slider-wrapper,
body.qdp-pwa-standalone .home-slider,
body.qdp-pwa-standalone .main-slider {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

body.qdp-pwa-standalone .rev_slider_wrapper *,
body.qdp-pwa-standalone rs-module-wrap *,
body.qdp-pwa-standalone .rs-fullwidth-wrap * {
    display: none !important;
}

body.qdp-pwa-standalone #qdp-quiz-container {
    min-height: 100vh !important;
    padding-top: env(safe-area-inset-top, 16px) !important;
}

body.qdp-pwa-standalone,
html.qdp-pwa-standalone {
    margin: 0 !important;
    padding: 0 !important;
}

html.qdp-pwa-standalone {
    margin-top: 0 !important;
}
