/* TMC Anket — Ziyaretçi tarafı stilleri (5 hazır şablon, responsive) */

.tmc-anket {
	--tmc-bg: #ffffff;
	--tmc-text: #0f172a;
	--tmc-muted: #64748b;
	--tmc-border: #e2e8f0;
	--tmc-accent: #2563eb;
	--tmc-accent-soft: #eff6ff;
	--tmc-accent-text: #ffffff;
	--tmc-opt-bg: #f8fafc;
	--tmc-radius: 16px;
	--tmc-opt-radius: 10px;
	--tmc-shadow: 0 10px 30px -12px rgba(2, 6, 23, .18);
	--tmc-track: #e2e8f0;

	box-sizing: border-box;
	max-width: 640px;
	margin: 1.5em auto;
	font-size: 15px;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .35s ease, transform .35s ease;
}
.tmc-anket *, .tmc-anket *::before, .tmc-anket *::after { box-sizing: border-box; }
.tmc-anket.tmc-ready { opacity: 1; transform: none; }

.tmc-preview-note {
	background: #fef3c7;
	color: #92400e;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	margin-bottom: 14px;
}

/* Başlık; kartların dışında, büyük puntoyla. */
.tmc-anket-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	padding: 0 2px;
}
.tmc-anket-title {
	margin: 0 !important;
	font-size: 1.6em !important;
	font-weight: 800 !important;
	color: inherit !important;
	line-height: 1.25 !important;
}
.tmc-anket-status {
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	padding: 4px 12px;
	white-space: nowrap;
	letter-spacing: .02em;
}
.tmc-status-active { background: #dcfce7; color: #15803d; }
.tmc-status-closed { background: #fee2e2; color: #b91c1c; }

/* ---------- Sorular (her biri kendi kartında) ---------- */
.tmc-question, .tmc-r-question {
	background: var(--tmc-bg);
	color: var(--tmc-text);
	border: 1px solid var(--tmc-border);
	border-radius: var(--tmc-radius);
	box-shadow: var(--tmc-shadow);
	padding: 18px 20px;
	margin-bottom: 16px;
}

/* Otomatik soru numaraları: görünen sıraya göre 1-2-3... */
.tmc-anket-body { counter-reset: tmcq; }
.tmc-question .tmc-question-title::before {
	counter-increment: tmcq;
	content: counter(tmcq) "- ";
	color: var(--tmc-accent);
	font-weight: 800;
}
.tmc-anket-results { counter-reset: tmcr; }
.tmc-r-question .tmc-r-title::before {
	counter-increment: tmcr;
	content: counter(tmcr) "- ";
	color: var(--tmc-accent);
	font-weight: 800;
}

.tmc-question-title {
	font-weight: 700;
	margin: 0 0 10px !important;
	color: var(--tmc-text) !important;
}
.tmc-option {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tmc-opt-bg);
	border: 1.5px solid var(--tmc-border);
	border-radius: var(--tmc-opt-radius);
	padding: 11px 14px;
	margin-bottom: 8px;
	cursor: pointer;
	transition: border-color .15s, background .15s, transform .1s;
	position: relative;
}
.tmc-option:hover { border-color: var(--tmc-accent); transform: translateY(-1px); }
.tmc-option input { position: absolute; opacity: 0; pointer-events: none; }
.tmc-option-mark {
	width: 18px;
	height: 18px;
	min-width: 18px;
	border: 2px solid var(--tmc-muted);
	border-radius: 50%;
	transition: all .15s;
	position: relative;
}
.tmc-question[data-type="checkbox"] .tmc-option-mark { border-radius: 5px; }
.tmc-option-text { flex: 1; }
.tmc-option-check {
	opacity: 0;
	font-weight: 800;
	color: var(--tmc-accent);
	transition: opacity .15s;
}
.tmc-option.tmc-selected,
.tmc-option:has(input:checked) {
	background: var(--tmc-accent-soft);
	border-color: var(--tmc-accent);
}
.tmc-option.tmc-selected .tmc-option-mark,
.tmc-option:has(input:checked) .tmc-option-mark {
	border-color: var(--tmc-accent);
	background: var(--tmc-accent);
	box-shadow: inset 0 0 0 3px var(--tmc-bg);
}
.tmc-option.tmc-selected .tmc-option-check,
.tmc-option:has(input:checked) .tmc-option-check { opacity: 1; }

.tmc-answered .tmc-option { cursor: default; }
.tmc-answered .tmc-option:hover { transform: none; }
.tmc-question[data-type="radio"].tmc-answered .tmc-option:not(.tmc-selected) { opacity: .45; }
.tmc-question[data-type="radio"].tmc-answered .tmc-option:not(.tmc-selected):hover { border-color: var(--tmc-border); }
.tmc-sending { pointer-events: none; opacity: .7; }

/* Katılım tamamlandığında tüm anket kilitlenir. */
.tmc-locked .tmc-option { cursor: default; pointer-events: none; }
.tmc-locked .tmc-option:hover { transform: none; border-color: var(--tmc-border); }
.tmc-locked .tmc-option.tmc-selected:hover { border-color: var(--tmc-accent); }
.tmc-locked .tmc-option:not(.tmc-selected) { opacity: .5; }
.tmc-locked .tmc-text-wrap { opacity: .6; pointer-events: none; }

/* Metin sorusu */
.tmc-text-wrap { display: flex; gap: 8px; align-items: flex-start; }
.tmc-text-input {
	flex: 1;
	border: 1.5px solid var(--tmc-border) !important;
	border-radius: var(--tmc-opt-radius) !important;
	padding: 10px 12px !important;
	font: inherit !important;
	color: var(--tmc-text) !important;
	background: var(--tmc-opt-bg) !important;
	resize: vertical;
	min-height: 44px;
}
.tmc-text-input:focus { outline: none; border-color: var(--tmc-accent) !important; }
.tmc-text-send {
	background: var(--tmc-accent) !important;
	color: var(--tmc-accent-text) !important;
	border: none !important;
	border-radius: var(--tmc-opt-radius) !important;
	padding: 11px 20px !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	cursor: pointer;
	transition: filter .15s;
	white-space: nowrap;
}
.tmc-text-send:hover { filter: brightness(1.1); }
.tmc-text-send:disabled { opacity: .5; cursor: default; }

.tmc-question-feedback { font-size: 13px; min-height: 18px; margin-top: 4px; font-weight: 600; }
.tmc-fb-ok { color: #15803d; }
.tmc-fb-err { color: #b91c1c; }

/* ---------- Mesajlar ---------- */
.tmc-anket-message {
	border-radius: var(--tmc-opt-radius);
	padding: 14px 16px;
	font-weight: 600;
	margin-bottom: 14px;
}
.tmc-tone-success { background: #dcfce7; color: #15803d; }
.tmc-tone-info { background: var(--tmc-accent-soft); color: var(--tmc-accent); }

/* ---------- Sonuçlar ---------- */
.tmc-anket-results { margin-bottom: 14px; }
.tmc-results-heading {
	font-weight: 800;
	font-size: 1.05em;
	margin: 4px 0 14px !important;
	color: var(--tmc-text) !important;
}
.tmc-r-title { font-weight: 700; margin: 0 0 12px !important; color: var(--tmc-text) !important; }
.tmc-r-row { margin-bottom: 10px; }
.tmc-r-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	font-size: 14px;
	margin-bottom: 4px;
}
.tmc-r-choice { font-weight: 600; }
.tmc-r-pct { font-weight: 800; color: var(--tmc-accent); white-space: nowrap; }
.tmc-r-pct small { color: var(--tmc-muted); font-weight: 500; }
.tmc-r-track {
	height: 10px;
	border-radius: 999px;
	background: var(--tmc-track);
	overflow: hidden;
}
.tmc-r-fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--tmc-accent), color-mix(in srgb, var(--tmc-accent) 55%, #ffffff));
	transition: width .9s cubic-bezier(.22, 1, .36, 1);
	min-width: 2px;
}
.tmc-r-total, .tmc-r-textcount { font-size: 12px; color: var(--tmc-muted); margin: 6px 0 0 !important; }

/* Kazanan (en çok oy alan) cevap */
.tmc-r-row.tmc-winner {
	background: var(--tmc-accent-soft);
	border: 1.5px solid var(--tmc-accent);
	border-radius: var(--tmc-opt-radius);
	padding: 12px 14px;
	margin: 0 0 14px;
}
.tmc-winner .tmc-r-choice { font-weight: 800; font-size: 1.06em; }
.tmc-winner .tmc-r-pct { font-size: 1.06em; }
.tmc-winner .tmc-r-track { height: 14px; }
.tmc-r-crown { margin-right: 5px; }

/* ---------- Alt bilgi ---------- */
.tmc-anket-footer {
	margin-top: 2px;
	padding: 0 4px;
	text-align: right;
}
.tmc-anket-brand {
	font-size: 10px;
	color: var(--tmc-muted);
	letter-spacing: .08em;
	text-transform: uppercase;
	font-weight: 700;
	opacity: .7;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.tmc-anket { padding: 18px 16px 10px; font-size: 14px; margin-left: 8px; margin-right: 8px; }
	.tmc-text-wrap { flex-direction: column; }
	.tmc-text-send { width: 100%; }
}

/* =====================================================
 * STİL ŞABLONLARI
 * ===================================================== */

/* s1 — Modern Beyaz: varsayılan değişkenler yukarıda. */

/* s2 — Koyu Mod */
.tmc-style-s2 {
	--tmc-bg: #0f172a;
	--tmc-text: #e2e8f0;
	--tmc-muted: #94a3b8;
	--tmc-border: #293548;
	--tmc-accent: #818cf8;
	--tmc-accent-soft: #1e1b4b;
	--tmc-accent-text: #0f172a;
	--tmc-opt-bg: #1e293b;
	--tmc-track: #1e293b;
	--tmc-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
}
.tmc-style-s2 .tmc-status-active { background: #14532d; color: #86efac; }
.tmc-style-s2 .tmc-status-closed { background: #7f1d1d; color: #fca5a5; }
.tmc-style-s2 .tmc-tone-success { background: #14532d; color: #86efac; }
.tmc-style-s2 .tmc-fb-ok { color: #86efac; }
.tmc-style-s2 .tmc-fb-err { color: #fca5a5; }

/* s3 — Gradyan */
.tmc-style-s3 {
	--tmc-accent: #7c3aed;
	--tmc-accent-soft: #f5f3ff;
	--tmc-border: #ede9fe;
	--tmc-opt-bg: #faf5ff;
	--tmc-track: #ede9fe;
	--tmc-radius: 20px;
}
.tmc-style-s3 .tmc-question,
.tmc-style-s3 .tmc-r-question {
	position: relative;
	overflow: hidden;
}
.tmc-style-s3 .tmc-question::before,
.tmc-style-s3 .tmc-r-question::before {
	content: "";
	display: block;
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 5px;
	background: linear-gradient(90deg, #7c3aed, #db2777, #f59e0b);
}
.tmc-style-s3 .tmc-r-fill { background: linear-gradient(90deg, #7c3aed, #db2777); }
.tmc-style-s3 .tmc-r-pct { color: #7c3aed; }

/* s4 — Minimal */
.tmc-style-s4 {
	--tmc-bg: #fafafa;
	--tmc-text: #171717;
	--tmc-muted: #737373;
	--tmc-border: #d4d4d4;
	--tmc-accent: #171717;
	--tmc-accent-soft: #f5f5f5;
	--tmc-accent-text: #fafafa;
	--tmc-opt-bg: #ffffff;
	--tmc-track: #e5e5e5;
	--tmc-radius: 6px;
	--tmc-opt-radius: 4px;
	--tmc-shadow: none;
}
.tmc-style-s4 .tmc-r-fill { background: #171717; }
.tmc-style-s4 .tmc-status-active { background: #f5f5f5; color: #171717; border: 1px solid #d4d4d4; }

/* s5 — Haber Kırmızısı */
.tmc-style-s5 {
	--tmc-accent: #dc2626;
	--tmc-accent-soft: #fef2f2;
	--tmc-border: #fecaca;
	--tmc-opt-bg: #fffbfb;
	--tmc-track: #fee2e2;
	--tmc-radius: 12px;
}
.tmc-style-s5 .tmc-question,
.tmc-style-s5 .tmc-r-question {
	border-top: 4px solid #dc2626;
}
.tmc-style-s5 .tmc-anket-title { text-transform: uppercase; letter-spacing: .01em; }
.tmc-style-s5 .tmc-r-fill { background: linear-gradient(90deg, #dc2626, #f87171); }
.tmc-style-s5 .tmc-r-pct { color: #dc2626; }
.tmc-style-s5 .tmc-tone-info { background: #fef2f2; color: #b91c1c; }

/* =====================================================
 * Anket sayfaları (tekil + arşiv)
 * ===================================================== */
.tmc-page-wrap { padding: 30px 15px 50px; background: #f5f6f8; }
.tmc-page-inner { max-width: 720px; margin: 0 auto; }
.tmc-archive-inner { max-width: 980px; }
.tmc-breadcrumb { margin: 0 0 14px; font-size: 14px; }
.tmc-breadcrumb a { color: #64748b; text-decoration: none; font-weight: 600; }
.tmc-breadcrumb a:hover { color: #2563eb; }

.tmc-countdown-banner {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #2563eb;
	border-radius: 10px;
	padding: 12px 16px;
	margin: 0 0 16px;
	font-size: 14px;
	color: #334155;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.tmc-countdown-banner .tmc-cd-text { color: #2563eb; }

.tmc-archive-title { font-size: 26px; margin: 0 0 10px; color: #0f172a; }
.tmc-archive-desc { color: #64748b; margin: 0 0 22px; max-width: 720px; font-size: 15px; line-height: 1.6; }
.tmc-archive-empty { color: #64748b; }
.tmc-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}
@media (max-width: 991px) {
	.tmc-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
	.tmc-archive-grid { grid-template-columns: 1fr; }
}
.tmc-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 18px;
	text-decoration: none;
	color: inherit;
	transition: transform .15s ease, box-shadow .15s ease;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.tmc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(15, 23, 42, .1); }
.tmc-card-thumb {
	margin: -18px -18px 4px;
	border-radius: 13px 13px 0 0;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #e2e8f0;
}
.tmc-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	max-width: 100%;
	transition: transform .3s ease;
}
.tmc-card:hover .tmc-card-thumb img { transform: scale(1.04); }

/* Tekil sayfa: öne çıkan görsel */
.tmc-featured {
	border-radius: 16px;
	overflow: hidden;
	margin: 0 0 16px;
	box-shadow: 0 10px 30px -12px rgba(2, 6, 23, .18);
}
.tmc-featured img { width: 100%; height: auto; display: block; max-width: 100%; }

/* Tekil anket sayfasında anket kartı; görsel ve geri sayım bandıyla aynı genişlikte. */
.tmc-page-inner .tmc-anket {
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}
.tmc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tmc-card-badge {
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 4px 10px;
	border-radius: 999px;
}
.tmc-card-active .tmc-card-badge { background: #dcfce7; color: #166534; }
.tmc-card-scheduled .tmc-card-badge { background: #fef3c7; color: #92400e; }
.tmc-card-closed .tmc-card-badge { background: #fee2e2; color: #991b1b; }
.tmc-card-adminonly .tmc-card-badge { background: #ede9fe; color: #5b21b6; }
.tmc-card-closed { opacity: .82; }
.tmc-card-countdown { font-size: 12px; font-weight: 700; color: #b45309; white-space: nowrap; }
.tmc-card-title { font-size: 17px; line-height: 1.35; margin: 0; color: #0f172a; }
.tmc-card-meta { display: flex; gap: 14px; font-size: 13px; color: #64748b; flex-wrap: wrap; }
.tmc-card-cta { margin-top: auto; font-size: 13px; font-weight: 700; color: #2563eb; }
.tmc-card-closed .tmc-card-cta { color: #64748b; }

.tmc-status-scheduled { background: #fef3c7; color: #92400e; }

@media (max-width: 480px) {
	.tmc-page-wrap { padding: 16px 8px 30px; }
	.tmc-archive-grid { grid-template-columns: 1fr; }
}

/* Açılış öncesi önizleme (oylama kapalı statik görünüm) */
.tmc-preview-body { opacity: .92; }
.tmc-option-static { cursor: default; }
.tmc-question-static .tmc-question-title { color: var(--tmc-text) !important; }
