/* Ori Popup — ön yüz stilleri
   Renkler her popup'a inline CSS değişkenleri (--ori-*) ile gelir.
   Koyu varyant, değişkenleri ezerek uygulanır. */

.ori-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: var(--ori-overlay, rgba(0, 0, 0, 0.6));
	box-sizing: border-box;
}

.ori-popup-overlay[hidden] {
	display: none !important;
}

body.ori-popup-open {
	overflow: hidden;
}

.ori-popup-box {
	position: relative;
	width: 100%;
	max-width: var(--ori-maxw, 480px);
	max-height: calc(100vh - 40px);
	overflow: hidden;
	background: var(--ori-bg, #fff);
	color: var(--ori-text, #1f1f1f);
	border-radius: var(--ori-radius, 18px);
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

/* Uzun içerik için yalnız içerik alanı kayar; kutu köşeleri temiz kalır. */
.ori-popup-box > .ori-popup-content,
.ori-popup-box > .ori-popup-steps {
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

.ori-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 6;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(20, 20, 20, 0.38);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	transition: background 0.15s ease, transform 0.15s ease;
}

.ori-popup-close:hover,
.ori-popup-close:focus-visible {
	background: rgba(20, 20, 20, 0.62);
	transform: rotate(90deg);
	outline: 2px solid var(--ori-accent, #a6d65a);
	outline-offset: 2px;
}

.ori-popup-img,
.ori-popup-img-link img {
	display: block;
	width: 100%;
	max-height: 300px;
	object-fit: var(--ori-imgfit, cover);
	object-position: var(--ori-focal, 50% 50%);
}

.ori-popup-content {
	padding: 26px 28px 30px;
}

.ori-popup-content:first-child {
	padding-top: 44px;
}

.ori-popup-title {
	margin: 0 0 12px;
	font-size: var(--ori-title-size, 26px);
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ori-text, #1f1f1f);
}

.ori-popup-text {
	margin: 0 0 20px;
	font-size: var(--ori-text-size, 16px);
	line-height: 1.6;
	opacity: 0.92;
}

.ori-popup-text p {
	margin: 0 0 10px;
}

.ori-popup-text a {
	color: var(--ori-accent, #a6d65a);
}

.ori-popup-btn {
	display: inline-block;
	padding: 13px 26px;
	background: var(--ori-accent, #a6d65a);
	color: var(--ori-btn-text, #10210a);
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	border: 2px solid transparent;
	border-radius: 12px;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ori-popup-btn:hover,
.ori-popup-btn:focus-visible {
	filter: brightness(0.95);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px -6px var(--ori-accent, #a6d65a);
	color: var(--ori-btn-text, #10210a);
}

/* ---- Dark mode köprüsü (ori-gece-modu ile uyum) ---- */
/* Otomatik: sayfada html.ori-dark varsa koyu uygula */
html.ori-dark .ori-popup-overlay.ori-variant-auto,
.ori-popup-overlay.ori-variant-dark {
	--ori-bg: #1b1b1b;
	--ori-text: #ededed;
}

html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-popup-box,
.ori-popup-overlay.ori-variant-dark .ori-popup-box {
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

/* ---- Animasyonlar ---- */
.ori-popup-overlay:not([hidden]) {
	animation: ori-fade-in 0.25s ease both;
}

.ori-popup-overlay.ori-anim-none:not([hidden]) {
	animation: none;
}

.ori-popup-overlay.ori-anim-zoom:not([hidden]) .ori-popup-box {
	animation: ori-zoom-in 0.25s ease both;
}

.ori-popup-overlay.ori-anim-slide:not([hidden]) .ori-popup-box {
	animation: ori-slide-up 0.3s ease both;
}

@keyframes ori-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes ori-zoom-in {
	from { opacity: 0; transform: scale(0.92); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes ori-slide-up {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ori-slide-down {
	from { opacity: 0; transform: translateY(-24px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ====== Faz 2: Popup tipleri ====== */

/* Slide-in ve çubuk: perde yok, sayfayı karartmaz, tıklamayı engellemez */
.ori-popup-overlay.ori-type-slidein,
.ori-popup-overlay.ori-type-bar {
	background: transparent;
	display: block;
	padding: 0;
	pointer-events: none;
}

.ori-popup-overlay.ori-type-slidein .ori-popup-box,
.ori-popup-overlay.ori-type-bar .ori-popup-box {
	pointer-events: auto;
}

/* --- Slide-in (köşeden kayan kutu) --- */
.ori-popup-overlay.ori-type-slidein .ori-popup-box {
	position: fixed;
	width: min(var(--ori-maxw, 360px), 92vw);
	max-width: none;
	max-height: calc(100vh - 32px);
}

.ori-pos-bottom-right .ori-popup-box { right: 16px; bottom: 16px; }
.ori-pos-bottom-left .ori-popup-box { left: 16px; bottom: 16px; }
.ori-pos-top-right .ori-popup-box { right: 16px; top: 16px; }
.ori-pos-top-left .ori-popup-box { left: 16px; top: 16px; }

.ori-popup-overlay.ori-type-slidein:not([hidden]) .ori-popup-box {
	animation: ori-slide-up 0.3s ease both;
}
.ori-popup-overlay.ori-type-slidein.ori-pos-top-right:not([hidden]) .ori-popup-box,
.ori-popup-overlay.ori-type-slidein.ori-pos-top-left:not([hidden]) .ori-popup-box {
	animation: ori-slide-down 0.3s ease both;
}

/* --- Bildirim çubuğu (ince şerit) --- */
.ori-popup-overlay.ori-type-bar .ori-popup-box {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	max-height: none;
	border-radius: 0;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.ori-bar-top .ori-popup-box { top: 0; }
.ori-bar-bottom .ori-popup-box { bottom: 0; }

.ori-type-bar .ori-popup-img,
.ori-type-bar .ori-popup-img-link img {
	order: 1;
	width: auto;
	height: 42px;
	max-height: 42px;
	border-radius: 6px;
}

.ori-type-bar .ori-popup-content {
	order: 2;
	flex: 1;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.ori-type-bar .ori-popup-title {
	margin: 0;
	font-size: 1.05rem;
}

.ori-type-bar .ori-popup-text {
	margin: 0;
}

.ori-type-bar .ori-popup-btn {
	padding: 8px 16px;
	white-space: nowrap;
}

.ori-type-bar .ori-popup-close {
	order: 3;
	position: static;
	margin-left: 8px;
	background: rgba(0, 0, 0, 0.18);
}

.ori-popup-overlay.ori-type-bar.ori-bar-top:not([hidden]) .ori-popup-box {
	animation: ori-slide-down 0.3s ease both;
}
.ori-popup-overlay.ori-type-bar.ori-bar-bottom:not([hidden]) .ori-popup-box {
	animation: ori-slide-up 0.3s ease both;
}

@media (prefers-reduced-motion: reduce) {
	.ori-popup-overlay:not([hidden]),
	.ori-popup-overlay:not([hidden]) .ori-popup-box {
		animation: none !important;
	}
}

@media (max-width: 600px) {
	.ori-popup-overlay {
		padding: 12px;
	}
	.ori-popup-title {
		font-size: 1.3rem;
	}
	.ori-popup-img,
	.ori-popup-img-link img {
		max-height: 220px;
	}
}

/* ====== Faz 4: Form + Geri sayım ====== */

/* Bal küpü (gizli) */
.ori-pf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* E-posta formu */
.ori-popup-form-block {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}
.ori-pf-name,
.ori-pf-email {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	font-size: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 9px;
	background: #fff;
	color: #1f1f1f;
}
.ori-pf-name:focus,
.ori-pf-email:focus {
	outline: 2px solid var(--ori-accent, #a6d65a);
	outline-offset: 1px;
	border-color: var(--ori-accent, #a6d65a);
}
.ori-pf-consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-size: 0.82rem;
	line-height: 1.45;
	text-align: left;
}
.ori-pf-consent a { color: var(--ori-accent, #a6d65a); }
.ori-pf-submit { width: 100%; }
.ori-pf-msg { font-size: 0.9rem; min-height: 1px; }
.ori-pf-msg.ori-pf-error { color: #c0392b; }
.ori-pf-msg.ori-pf-success { color: #2e7d32; font-weight: 600; }

/* Geri sayım */
.ori-popup-countdown {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 18px 0 4px;
}
.ori-align-left .ori-popup-countdown { justify-content: flex-start; }
.ori-cd-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 58px;
	padding: 11px 8px;
	background: color-mix(in srgb, var(--ori-accent, #a6d65a) 14%, transparent);
	border: 1px solid color-mix(in srgb, var(--ori-accent, #a6d65a) 32%, transparent);
	border-radius: 12px;
}
.ori-cd-unit b { font-size: 1.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ori-cd-unit i { font-style: normal; font-size: 0.62rem; opacity: 0.65; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.ori-cd-done { font-weight: 700; color: var(--ori-accent, #a6d65a); }

/* Dark mode uyumu: form girişleri ve sayaç kutuları */
html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-pf-name,
html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-pf-email,
.ori-popup-overlay.ori-variant-dark .ori-pf-name,
.ori-popup-overlay.ori-variant-dark .ori-pf-email {
	background: #2a2a2a;
	color: #ededed;
	border-color: rgba(255, 255, 255, 0.2);
}
html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-cd-unit,
.ori-popup-overlay.ori-variant-dark .ori-cd-unit {
	background: rgba(255, 255, 255, 0.09);
}

/* ====== Faz 6: Çok adımlı paneller ====== */
.ori-popup-steps .ori-step { display: none; }
.ori-popup-steps .ori-step.is-active { display: block; }
.ori-step-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 18px;
}
.ori-step-skip {
	padding: 12px 22px;
	background: transparent;
	color: var(--ori-text, #1f1f1f);
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 10px;
	cursor: pointer;
	font-weight: 500;
	transition: background 0.15s ease;
}
.ori-step-skip:hover,
.ori-step-skip:focus-visible {
	background: rgba(0, 0, 0, 0.05);
	outline: 2px solid var(--ori-accent, #a6d65a);
	outline-offset: 2px;
}
html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-step-skip,
.ori-popup-overlay.ori-variant-dark .ori-step-skip {
	border-color: rgba(255, 255, 255, 0.25);
}
html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-step-skip:hover,
.ori-popup-overlay.ori-variant-dark .ori-step-skip:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   Faz 7: Tasarım sistemi — hizalama, stil temaları, yerleşimler,
   buton stilleri, gölgeler. Sınıflar overlay üzerinde gelir.
   ============================================================ */

/* ---- Hizalama ---- */
.ori-align-center .ori-popup-content { text-align: center; }
.ori-align-center .ori-step-actions { justify-content: center; }
.ori-align-left .ori-popup-content { text-align: left; }
.ori-align-left .ori-step-actions { justify-content: flex-start; }

/* Görselsiz/üst-görselsiz: kapatma butonunun başlığı ezmemesi için üst boşluk */
.ori-no-media.ori-layout-none .ori-popup-content,
.ori-no-media.ori-layout-top .ori-popup-content { padding-top: 48px; }

/* ---- Gölgeler ---- */
.ori-shadow-none .ori-popup-box { box-shadow: none; }
.ori-shadow-soft .ori-popup-box { box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.28); }
.ori-shadow-medium .ori-popup-box { box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.40); }
.ori-shadow-strong .ori-popup-box { box-shadow: 0 34px 80px -16px rgba(0, 0, 0, 0.55); }

/* ---- Stil temaları ---- */
/* Modern: temel stil (ek kural gerekmez) */

/* Minimal */
.ori-style-minimal .ori-popup-content { padding: 36px 36px 40px; }
.ori-style-minimal .ori-popup-title { font-weight: 600; letter-spacing: 0; }
.ori-style-minimal .ori-popup-text { opacity: 0.78; }
.ori-style-minimal .ori-popup-btn { font-weight: 500; }

/* Zarif (serif başlık + ince ayraç) */
.ori-style-elegant .ori-popup-title {
	font-family: Georgia, 'Times New Roman', 'Noto Serif', serif;
	font-weight: 600;
	letter-spacing: 0;
}
.ori-style-elegant .ori-popup-title::after {
	content: '';
	display: block;
	width: 46px;
	height: 3px;
	margin: 16px auto 0;
	border-radius: 2px;
	background: var(--ori-accent, #a6d65a);
}
.ori-style-elegant.ori-align-left .ori-popup-title::after { margin-left: 0; margin-right: auto; }
.ori-style-elegant .ori-popup-text { line-height: 1.7; }

/* Cesur */
.ori-style-bold .ori-popup-title { font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.ori-style-bold .ori-popup-btn { font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

/* Yumuşak */
.ori-style-soft .ori-popup-box { border-radius: 26px; }
.ori-style-soft .ori-popup-btn { border-radius: 999px; }
.ori-style-soft .ori-cd-unit { border-radius: 16px; }

/* ---- Buton stilleri (stil temalarından sonra gelir, onları ezer) ---- */
.ori-btn-pill .ori-popup-btn { border-radius: 999px; }
.ori-btn-block .ori-popup-btn { display: block; width: 100%; text-align: center; }
.ori-btn-outline .ori-popup-btn {
	background: transparent;
	color: var(--ori-accent, #a6d65a);
	border: 2px solid var(--ori-accent, #a6d65a);
}
.ori-btn-outline .ori-popup-btn:hover,
.ori-btn-outline .ori-popup-btn:focus-visible {
	background: var(--ori-accent, #a6d65a);
	color: var(--ori-btn-text, #10210a);
}

/* ---- Yerleşim: YANDA (ikiye bölünmüş kart) ---- */
.ori-layout-left .ori-popup-split { display: flex; align-items: stretch; }
.ori-layout-left .ori-popup-media { position: relative; flex: 0 0 42%; min-height: 320px; overflow: hidden; }
.ori-layout-left .ori-popup-media picture,
.ori-layout-left .ori-popup-media .ori-popup-img-link { position: absolute; inset: 0; display: block; }
.ori-layout-left .ori-popup-media .ori-popup-img,
.ori-layout-left .ori-popup-media img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.ori-layout-left .ori-popup-side { flex: 1 1 auto; min-width: 0; max-height: calc(100vh - 40px); overflow-y: auto; }
.ori-layout-left .ori-popup-side .ori-popup-content { padding-top: 46px; }

/* ---- Yerleşim: ARKA PLAN (görsel üstüne yazı) ---- */
.ori-layout-background .ori-popup-box {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 400px;
	--ori-text: #ffffff;
}
.ori-layout-background .ori-popup-bg { position: absolute; inset: 0; z-index: 0; }
.ori-layout-background .ori-popup-bg picture,
.ori-layout-background .ori-popup-bg .ori-popup-img-link { position: absolute; inset: 0; display: block; }
.ori-layout-background .ori-popup-bg .ori-popup-img,
.ori-layout-background .ori-popup-bg img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.ori-layout-background .ori-popup-scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.38) 45%, rgba(0, 0, 0, 0.10) 100%);
}
.ori-layout-background .ori-popup-content {
	position: relative;
	z-index: 2;
	width: 100%;
	box-sizing: border-box;
	color: #fff;
	text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.ori-layout-background .ori-popup-title { color: #fff; }
.ori-layout-background .ori-popup-close { background: rgba(0, 0, 0, 0.5); }

/* ---- Mobil ---- */
@media (max-width: 560px) {
	.ori-layout-left .ori-popup-split { flex-direction: column; }
	.ori-layout-left .ori-popup-media { flex-basis: auto; height: 190px; min-height: 0; }
	.ori-layout-left .ori-popup-side .ori-popup-content { padding-top: 26px; }
	.ori-layout-background .ori-popup-box { min-height: 340px; }
	.ori-popup-content { padding: 22px 22px 26px; }
}

/* color-mix desteklemeyen tarayıcılar için sayaç yedeği */
@supports not (background: color-mix(in srgb, #000 10%, transparent)) {
	.ori-cd-unit { background: rgba(0, 0, 0, 0.06); border-color: rgba(0, 0, 0, 0.12); }
	html.ori-dark .ori-popup-overlay.ori-variant-auto .ori-cd-unit,
	.ori-popup-overlay.ori-variant-dark .ori-cd-unit { background: rgba(255, 255, 255, 0.09); }
}

/* ====== Faz 8: Alıntı / dize kartı ====== */
.ori-popup-quote {
	position: relative;
	margin: 0 0 20px;
}
.ori-popup-quote::before {
	content: '\201C';
	display: block;
	font-family: Georgia, 'Noto Serif', serif;
	font-size: 3.6rem;
	line-height: 0.1;
	height: 0.5em;
	color: var(--ori-accent, #a6d65a);
	opacity: 0.55;
}
.ori-popup-quote .ori-popup-text {
	font-family: Georgia, 'Noto Serif', serif;
	font-style: italic;
	font-size: calc(var(--ori-text-size, 16px) + 2px);
	line-height: 1.65;
	margin-bottom: 10px;
}
.ori-popup-cite {
	display: block;
	font-style: normal;
	font-size: 0.85rem;
	font-weight: 600;
	opacity: 0.72;
	letter-spacing: 0.02em;
}

/* ============================================================
   POSTER yerleşimi: görsel hiç kırpılmaz, doğal oranında tam görünür;
   popup kutusu görselin boyutuna göre şekillenir.
   ============================================================ */
.ori-layout-poster .ori-popup-box {
	width: -moz-fit-content;
	width: fit-content;
	max-width: min(92vw, 760px);
	max-height: 92vh;
	overflow-y: auto;
}
/* İçerik, kutuyu genişletmeden görselin genişliğini doldurur. */
.ori-layout-poster .ori-popup-box > .ori-popup-content {
	overflow: visible;
	max-height: none;
	width: 0;
	min-width: 100%;
	box-sizing: border-box;
}
.ori-layout-poster picture,
.ori-layout-poster .ori-popup-img-link { display: block; }
.ori-layout-poster .ori-popup-img,
.ori-layout-poster .ori-popup-img-link img,
.ori-layout-poster picture img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(92vw, 760px);
	max-height: 80vh;
	object-fit: contain;
	margin: 0 auto;
	border-radius: var(--ori-radius, 18px) var(--ori-radius, 18px) 0 0;
}
.ori-layout-poster.ori-no-media .ori-popup-content { padding-top: 48px; }

@media (max-width: 600px) {
	.ori-layout-poster .ori-popup-img,
	.ori-layout-poster .ori-popup-img-link img,
	.ori-layout-poster picture img { max-height: 68vh; }
}

/* ====== Slide-in / çubuk: tasarım uyumu güvencesi ======
   Görsel yerleşimi (poster/yanda/arka plan) yalnız lightbox içindir; bu tipler
   basit düzen kullanır. Yüksek özgüllükle, sızan kuralları geçersiz kılıyoruz. */
.ori-popup-overlay.ori-type-slidein .ori-popup-img,
.ori-popup-overlay.ori-type-slidein .ori-popup-img-link img,
.ori-popup-overlay.ori-type-slidein picture img {
	width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: var(--ori-imgfit, cover);
	object-position: var(--ori-focal, 50% 50%);
	margin: 0;
}
.ori-popup-overlay.ori-type-bar .ori-popup-img,
.ori-popup-overlay.ori-type-bar .ori-popup-img-link img,
.ori-popup-overlay.ori-type-bar picture img {
	width: auto;
	height: 42px;
	max-height: 42px;
	max-width: 120px;
	object-fit: contain;
	border-radius: 6px;
	margin: 0;
}
/* Poster'ın kutu/içerik numaraları bu tiplere uygulanmasın */
.ori-popup-overlay.ori-type-slidein .ori-popup-box,
.ori-popup-overlay.ori-type-bar .ori-popup-box {
	width: auto;
}
.ori-popup-overlay.ori-type-slidein .ori-popup-box > .ori-popup-content,
.ori-popup-overlay.ori-type-bar .ori-popup-box > .ori-popup-content {
	width: auto;
	min-width: 0;
	overflow: visible;
}
