/* ================================================================
   Kokoro Academy — Fluency XRAY Diagnostic Test Page
   Scoped to .kka-diag-wrap so nothing leaks into the rest of the site.
   ================================================================ */

/* ----------------------------------------------------------------
   Wrap + background
   ---------------------------------------------------------------- */
.kka-diag-wrap {
	min-height: 100vh;
	background: #f5f3ff;
	padding-bottom: 80px;
}

/* ----------------------------------------------------------------
   Sticky progress bar
   ---------------------------------------------------------------- */
.kka-diag-progress-wrap {
	position: sticky;
	top: 0;
	z-index: 200;
	background: #fff;
	border-bottom: 1px solid #e8e4f8;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 28px;
}
.kka-diag-progress-bar {
	flex: 1;
	height: 6px;
	background: #e8e4f8;
	border-radius: 99px;
	overflow: hidden;
}
.kka-diag-progress-fill {
	height: 100%;
	background: #804bd5;
	border-radius: 99px;
	width: 0%;
	transition: width 0.5s ease;
}
.kka-diag-section-label {
	font-size: 12px;
	font-weight: 700;
	color: #6b6b8a;
	white-space: nowrap;
	min-width: 90px;
	text-align: right;
}

/* ----------------------------------------------------------------
   Section container
   ---------------------------------------------------------------- */
.kka-diag-section {
	display: none;
	max-width: 760px;
	margin: 40px auto 0;
	padding: 0 20px;
}
.kka-diag-section.active { display: block; }

.kka-diag-special-screen {
	max-width: 520px;
	margin: 80px auto 0;
	padding: 0 20px;
}

/* ----------------------------------------------------------------
   Card
   ---------------------------------------------------------------- */
.kka-diag-card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 2px 16px rgba(26, 21, 39, 0.08);
	padding: 40px 44px;
	border: 1px solid #e8e4f8;
}
.kka-diag-card.kka-diag-center {
	text-align: center;
	padding: 60px 44px;
}

/* ----------------------------------------------------------------
   Section tag pill
   ---------------------------------------------------------------- */
.kka-diag-section-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #804bd5;
	background: #f3eeff;
	border-radius: 99px;
	padding: 4px 14px;
	margin-bottom: 18px;
}
.kka-diag-section-tag.timed {
	color: #b45309;
	background: #fffbeb;
	border: 1px solid #fde68a;
}

/* ----------------------------------------------------------------
   Start screen hero
   ---------------------------------------------------------------- */
.kka-diag-hero-title {
	font-size: 2.1rem;
	font-weight: 800;
	color: #18103e;
	margin: 0 0 12px;
	line-height: 1.2;
}
.kka-diag-hero-sub {
	font-size: 1rem;
	color: #6b6b8a;
	margin: 0 0 28px;
	line-height: 1.65;
}

/* Meta cards row */
.kka-diag-meta-cards {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}
.kka-diag-meta-card {
	flex: 1;
	min-width: 130px;
	background: #f9f7ff;
	border: 1px solid #e8e4f8;
	border-radius: 10px;
	padding: 14px 18px;
}
.kka-diag-meta-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	color: #6b6b8a;
	text-transform: uppercase;
	margin-bottom: 5px;
}
.kka-diag-meta-value {
	font-size: 15px;
	font-weight: 700;
	color: #18103e;
}
.kka-diag-meta-value::before {
	content: '\2022 ';
	color: #804bd5;
}

/* Tips row */
.kka-diag-tips {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}
.kka-diag-tip {
	flex: 1;
	min-width: 150px;
	border: 1px solid #e8e4f8;
	border-radius: 10px;
	padding: 14px 16px;
}
.kka-diag-tip strong {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #18103e;
	margin-bottom: 4px;
}
.kka-diag-tip span {
	font-size: 13px;
	color: #6b6b8a;
	line-height: 1.5;
}

/* User note */
.kka-diag-user-note {
	font-size: 13px;
	color: #6b6b8a;
	margin: 0;
	padding-top: 20px;
	border-top: 1px solid #e8e4f8;
}
.kka-diag-user-note strong { color: #18103e; }

/* ----------------------------------------------------------------
   Section header (numbered sections)
   ---------------------------------------------------------------- */
.kka-diag-section-title {
	font-size: 1.55rem;
	font-weight: 800;
	color: #18103e;
	margin: 0 0 10px;
}
.kka-diag-section-desc {
	font-size: 13.5px;
	color: #6b6b8a;
	margin-bottom: 22px;
	line-height: 1.65;
	padding: 12px 16px;
	background: #f9f7ff;
	border-radius: 8px;
	border-left: 3px solid #804bd5;
}

/* ----------------------------------------------------------------
   Timer bar
   ---------------------------------------------------------------- */
.kka-diag-timer-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 30px;
	padding: 10px 18px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 10px;
}
.kka-diag-timer-icon { font-size: 17px; flex-shrink: 0; }
.kka-diag-timer-display {
	font-size: 20px;
	font-weight: 800;
	color: #92400e;
	min-width: 58px;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
}
.kka-diag-timer-display.kka-warn { color: #d97706; }
.kka-diag-timer-display.kka-crit { color: #dc2626; animation: kka-pulse 1s ease infinite; }
.kka-diag-timer-track {
	flex: 1;
	height: 5px;
	background: #fef3c7;
	border-radius: 99px;
	overflow: hidden;
}
.kka-diag-timer-fill {
	height: 100%;
	background: #d97706;
	border-radius: 99px;
	width: 100%;
	transition: width 1s linear;
}

@keyframes kka-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* ----------------------------------------------------------------
   Questions
   ---------------------------------------------------------------- */
.kka-diag-question {
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid #f0ecfb;
}
.kka-diag-question:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.kka-diag-q-text {
	font-size: 15px;
	font-weight: 600;
	color: #18103e;
	margin-bottom: 14px;
	line-height: 1.5;
}

/* Sentence-to-fix display */
.kka-diag-q-fix {
	font-size: 15px;
	font-style: italic;
	color: #5b21b6;
	background: #f5f3ff;
	padding: 12px 16px;
	border-radius: 8px;
	border-left: 3px solid #804bd5;
	margin-bottom: 12px;
	line-height: 1.5;
}

/* ----------------------------------------------------------------
   Radio buttons
   ---------------------------------------------------------------- */
.kka-diag-radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kka-diag-radio-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1.5px solid #e8e4f8;
	border-radius: 9px;
	cursor: pointer;
	transition: border-color .18s, background .18s;
	font-size: 14px;
	color: #18103e;
	line-height: 1.5;
}
.kka-diag-radio-label:hover {
	border-color: #804bd5;
	background: #faf8ff;
}
.kka-diag-radio-label input[type="radio"] {
	margin-top: 3px;
	accent-color: #804bd5;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}
.kka-diag-radio-label:has(input:checked) {
	border-color: #804bd5;
	background: #f5f3ff;
}

/* ----------------------------------------------------------------
   Text inputs
   ---------------------------------------------------------------- */
.kka-diag-text-input {
	width: 100%;
	padding: 13px 16px;
	border: 1.5px solid #e8e4f8;
	border-radius: 9px;
	font-size: 14px;
	color: #18103e;
	background: #fafbff;
	outline: none;
	transition: border-color .18s, box-shadow .18s;
	box-sizing: border-box;
	font-family: inherit;
}
.kka-diag-text-input:focus {
	border-color: #804bd5;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(128, 75, 213, .12);
}

/* ----------------------------------------------------------------
   Scenario box + textareas
   ---------------------------------------------------------------- */
.kka-diag-scenario-box {
	background: #f9f7ff;
	border: 1px solid #e8e4f8;
	border-radius: 9px;
	padding: 14px 18px;
	font-size: 14px;
	color: #6b6b8a;
	margin-bottom: 14px;
	line-height: 1.7;
}
.kka-diag-scenario-box ul {
	margin: 8px 0 0;
	padding-left: 20px;
}
.kka-diag-scenario-box li { margin-bottom: 4px; }

.kka-diag-textarea-wrap { position: relative; }
.kka-diag-textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1.5px solid #e8e4f8;
	border-radius: 9px;
	font-size: 14px;
	color: #18103e;
	background: #fafbff;
	outline: none;
	resize: vertical;
	font-family: inherit;
	transition: border-color .18s, box-shadow .18s;
	box-sizing: border-box;
	line-height: 1.65;
}
.kka-diag-textarea:focus {
	border-color: #804bd5;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(128, 75, 213, .12);
}
.kka-diag-word-count {
	font-size: 12px;
	color: #6b6b8a;
	text-align: right;
	margin-top: 5px;
}

/* ----------------------------------------------------------------
   Navigation row
   ---------------------------------------------------------------- */
.kka-diag-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 22px;
}
.kka-diag-nav.no-back { justify-content: flex-end; }

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */
.kka-diag-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 30px;
	background: linear-gradient(135deg, #804bd5, #6a3ab5);
	color: #fff !important;
	border: none;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none !important;
	transition: opacity .2s, transform .15s;
	font-family: inherit;
}
.kka-diag-btn-primary:hover  { opacity: .88; transform: translateY(-1px); }
.kka-diag-btn-primary:active { transform: translateY(0); }
.kka-diag-btn-primary:disabled {
	opacity: .5;
	cursor: not-allowed;
	transform: none;
}

/* ----------------------------------------------------------------
   Status screens (success / error / done)
   ---------------------------------------------------------------- */
.kka-diag-success-icon,
.kka-diag-error-icon,
.kka-diag-done-icon {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	margin: 0 auto 22px;
	color: #fff;
}
.kka-diag-success-icon { background: #22c55e; }
.kka-diag-error-icon   { background: #ef4444; }
.kka-diag-done-icon    { background: #804bd5; }

.kka-diag-done-screen {
	max-width: 500px;
	margin: 80px auto 0;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 2px 16px rgba(26,21,39,.08);
	padding: 60px 44px;
	text-align: center;
	border: 1px solid #e8e4f8;
}
.kka-diag-done-screen h2 { color: #18103e; margin-bottom: 12px; }
.kka-diag-done-screen p  { color: #6b6b8a; line-height: 1.65; margin-bottom: 24px; }

.kka-diag-card h2  { color: #18103e; margin: 0 0 10px; }
.kka-diag-card p   { color: #6b6b8a; line-height: 1.65; margin: 0 0 10px; }
.kka-diag-muted    { font-size: 13px; color: #6b6b8a !important; }

/* ----------------------------------------------------------------
   Spinner
   ---------------------------------------------------------------- */
.kka-diag-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #e8e4f8;
	border-top-color: #804bd5;
	border-radius: 50%;
	animation: kka-diag-spin .75s linear infinite;
	margin: 0 auto 24px;
}
@keyframes kka-diag-spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------
   Modal (dashboard "Teste Başla" info popup)
   ---------------------------------------------------------------- */
.kka-test-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(18, 10, 46, .55);
	backdrop-filter: blur(3px);
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.kka-test-modal-overlay.open { display: flex; }

.kka-test-modal {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 40px rgba(18,10,46,.22);
	padding: 36px 36px 28px;
	max-width: 460px;
	width: 100%;
	position: relative;
	animation: kka-modal-in .22s ease;
}
@keyframes kka-modal-in {
	from { opacity: 0; transform: translateY(12px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kka-test-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 22px;
	color: #6b6b8a;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
}
.kka-test-modal-close:hover { color: #18103e; }

.kka-test-modal-icon {
	font-size: 32px;
	margin-bottom: 10px;
}
.kka-test-modal h3 {
	font-size: 1.35rem;
	font-weight: 800;
	color: #18103e;
	margin: 0 0 14px;
}
.kka-test-modal-meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.kka-test-modal-meta span {
	font-size: 13px;
	font-weight: 600;
	color: #6b6b8a;
	background: #f5f3ff;
	border: 1px solid #e8e4f8;
	border-radius: 99px;
	padding: 5px 14px;
}
.kka-test-modal-tips {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}
.kka-test-modal-tip {
	font-size: 13.5px;
	color: #18103e;
	padding: 9px 14px;
	background: #f9f7ff;
	border-radius: 8px;
	border-left: 3px solid #804bd5;
}
.kka-test-modal-tip strong { color: #804bd5; }

.kka-test-modal-note {
	font-size: 12.5px;
	color: #6b6b8a;
	margin: 0 0 22px;
	text-align: center;
}
.kka-test-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kka-test-modal-later-btn {
	background: none;
	border: 1.5px solid #e8e4f8;
	border-radius: 50px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	color: #6b6b8a;
	cursor: pointer;
	font-family: inherit;
	transition: border-color .18s;
	width: 100%;
}
.kka-test-modal-later-btn:hover { border-color: #804bd5; color: #804bd5; }

.kka-test-modal .kka-diag-btn-primary,
.kka-test-modal .kka-test-banner-btn {
	width: 100%;
	justify-content: center;
	text-align: center;
}

/* ----------------------------------------------------------------
   Toast notification (1-minute warning)
   ---------------------------------------------------------------- */
#kka-diag-toast {
	position: fixed;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: #1c1033;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	padding: 14px 24px;
	border-radius: 50px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
	z-index: 9999;
	opacity: 0;
	transition: opacity .3s ease, transform .3s ease;
	white-space: nowrap;
	pointer-events: none;
}
#kka-diag-toast.kka-toast-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 640px) {
	.kka-diag-card { padding: 24px 20px; }
	.kka-diag-hero-title { font-size: 1.65rem; }
	.kka-diag-meta-cards,
	.kka-diag-tips { flex-direction: column; }
	.kka-diag-meta-card,
	.kka-diag-tip { min-width: auto; }
	.kka-test-modal { padding: 28px 22px 22px; }
}