/**
 * Tributo — çok adımlı bağış modalı stilleri (FAZ 9).
 * Birincil renk white-label `--tributo-primary` değişkeninden gelir.
 */

.tributo-donate-root {
	--tributo-primary: #0b72d9;
	display: inline-block;
}

[x-cloak] {
	display: none !important;
}

/* Tetikleyici buton */
.tributo-donate-trigger {
	/* Buton artık tek başına (sarmalayıcısız) basılır; birincil renk varsayılanı
	   burada tanımlı. Per-buton renk inline `style` ile geçersiz kılınır. */
	--tributo-primary: #0b72d9;
	display: inline-block;
	padding: 12px 28px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: var(--tributo-primary);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.05s ease;
}

.tributo-donate-trigger:hover {
	filter: brightness( 1.08 );
}

.tributo-donate-trigger:active {
	transform: translateY( 1px );
}

/* Overlay */
.tributo-modal-overlay {
	/* `x-teleport="body"` ile overlay <body> altına taşındığından `.tributo-donate-root`
	   üzerindeki birincil renk mirasını alamaz; varsayılanı burada da tanımlıyoruz. Marka
	   rengi veya per-instance override inline `style` ile bunu geçersiz kılmaya devam eder. */
	--tributo-primary: #0b72d9;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba( 0, 0, 0, 0.55 );
	overflow-y: auto;
}

body.tributo-modal-open {
	overflow: hidden;
}

/* Modal kutusu */
.tributo-modal {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 92vh;
	overflow-y: auto;
	padding: 28px 26px 24px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.35 );
	box-sizing: border-box;
	color: #1d2327;
}

/* Açılış/kapanış animasyonu (Alpine x-transition sınıfları). Modal hafifçe
   büyüyerek ve yukarıdan kayarak belirir; ekrana "patlamaz". */
.tributo-modal-enter {
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.tributo-modal-enter-start {
	opacity: 0;
	transform: translateY( 14px ) scale( 0.96 );
}

.tributo-modal-enter-end {
	opacity: 1;
	transform: translateY( 0 ) scale( 1 );
}

.tributo-modal-leave {
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.tributo-modal-leave-start {
	opacity: 1;
	transform: translateY( 0 ) scale( 1 );
}

.tributo-modal-leave-end {
	opacity: 0;
	transform: translateY( 8px ) scale( 0.98 );
}

.tributo-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	width: 36px;
	height: 36px;
	font-size: 26px;
	line-height: 1;
	color: #666;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.tributo-modal-close:hover {
	color: #000;
}

.tributo-modal-title {
	margin: 0 30px 16px 0;
	font-size: 22px;
	line-height: 1.25;
}

.tributo-modal-intro {
	margin: -8px 0 16px;
	color: #555;
	font-size: 14px;
	line-height: 1.5;
}

/* Adım göstergesi */
.tributo-steps {
	display: flex;
	gap: 8px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.tributo-steps li {
	flex: 1;
	height: 6px;
	border-radius: 3px;
	background: #e2e4e7;
	position: relative;
}

.tributo-steps li span {
	position: absolute;
	left: -2px;
	top: -2px;
	width: 0;
	height: 0;
	overflow: hidden;
}

.tributo-steps li.is-active,
.tributo-steps li.is-done {
	background: var(--tributo-primary);
}

/* Honeypot — ekran dışı */
.tributo-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Adımlar */
.tributo-step {
	animation: tributo-fade 0.2s ease;
}

@keyframes tributo-fade {
	from { opacity: 0; transform: translateY( 6px ); }
	to { opacity: 1; transform: none; }
}

/* Adım 1: tutarlar */
.tributo-presets {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 10px;
	margin-bottom: 16px;
}

.tributo-preset {
    align-items: center;
    background-color: #fff;
    border: 1px solid #9a9a9a;
    border-radius: .5rem;
    box-shadow: none;
    color: #1d2327;
    cursor: pointer;
    display: flex;
    font-size: 1.750rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    list-style: none;
    margin-bottom: 0;
    padding: 1.7rem;
    text-align: center;
    transition-duration: .2s;
    transition-property: background-color, color, filter, box-shadow, transform, border;
    transition-timing-function: ease-in;
    width: 100%;
}

.tributo-preset:hover {
	border-color: var(--tributo-primary);
}

.tributo-preset.is-selected {
    border: none;
    color: #fff;
	background: var(--tributo-primary);
}

.tributo-custom {
	display: block;
	margin-bottom: 8px;
}

.tributo-custom > span {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
}

/* Form alanları */
.tributo-step label {
	display: block;
	margin-bottom: 14px;
}

.tributo-step label > span,
.tributo-field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
}

.tributo-step input[type="text"],
.tributo-step input[type="email"],
.tributo-step input[type="number"],
.tributo-step textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 15px;
	color: #1d2327;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	box-sizing: border-box;
}

.tributo-step input:focus,
.tributo-step textarea:focus {
	border-color: var(--tributo-primary);
	outline: 2px solid color-mix( in srgb, var(--tributo-primary) 25%, transparent );
	outline-offset: 0;
}

.tributo-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.tributo-sep {
	margin: 6px 0 12px;
	border: 0;
	border-top: 1px solid #e2e4e7;
}

.tributo-section-hint {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	color: #787c82;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Kart seçici */
.tributo-card-picker {
	margin-bottom: 16px;
}

.tributo-card-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 10px;
}

.tributo-card-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px;
	font-size: 12px;
	background: #f6f7f7;
	border: 2px solid #dcdcde;
	border-radius: 8px;
	cursor: pointer;
}

.tributo-card-option img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.tributo-card-option.is-selected {
	border-color: var(--tributo-primary);
}

/* Hatalar */
.tributo-error {
	margin: 4px 0 12px;
	padding: 8px 12px;
	font-size: 13px;
	color: #842029;
	background: #f8d7da;
	border-radius: 6px;
}

/* Aksiyonlar */
.tributo-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
}

.tributo-actions .tributo-btn-primary {
	margin-left: auto;
}

.tributo-btn-primary,
.tributo-btn-ghost {
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	border: 2px solid var(--tributo-primary);
}

.tributo-btn-primary {
	color: #fff;
	background: var(--tributo-primary);
}

.tributo-btn-primary:disabled {
	opacity: 0.6;
	cursor: default;
}

.tributo-btn-ghost {
	color: var(--tributo-primary);
	background: transparent;
}

/* Dikey (stacked) aksiyonlar + tam genişlik buton */
.tributo-actions-stacked {
	flex-direction: column;
	gap: 10px;
}

.tributo-actions-stacked .tributo-btn-primary {
	margin-left: 0;
}

.tributo-btn-block {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tributo-btn-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tributo-btn-arrow {
	font-size: 18px;
	line-height: 1;
	transition: transform 0.15s ease;
}

.tributo-btn-block:hover .tributo-btn-arrow {
	transform: translateX( 3px );
}

/* Alan bazlı doğrulama */
.tributo-field {
	margin-bottom: 14px;
}

.tributo-field > label {
	margin-bottom: 0;
}

.tributo-input-wrap {
	position: relative;
	display: block;
}

.tributo-invalid-icon {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY( -50% );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: #d63638;
	border-radius: 50%;
	pointer-events: none;
}

.tributo-field.is-invalid input {
	border-color: #d63638;
	padding-right: 38px;
}

.tributo-field.is-invalid input:focus {
	border-color: #d63638;
	outline-color: rgba( 214, 54, 56, 0.25 );
}

.tributo-card-picker.is-invalid .tributo-field-label {
	color: #d63638;
}

.tributo-card-picker.is-invalid .tributo-card-grid {
	padding: 6px;
	border: 1px solid #d63638;
	border-radius: 8px;
}

.tributo-field-error {
	margin: 6px 0 0;
	font-size: 13px;
	color: #d63638;
}

/* Güvenli ödeme ibaresi (modal altı) */
.tributo-secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 16px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
}

.tributo-secure-lock {
	display: inline-flex;
	color: #1a9b4b;
}

.tributo-secure-lock svg {
	display: block;
}

/* Adım 3: ödeme */
.tributo-pay-summary {
	margin-bottom: 12px;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	color: var(--tributo-primary);
}

/* Bağış özeti kartı (GiveWP tarzı) */
.tributo-summary-card {
	margin-bottom: 16px;
	padding: 18px 20px;
	background: #f6f7f7;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
}

.tributo-summary-title {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 700;
	color: #1d2327;
}

.tributo-summary-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 0;
	font-size: 14px;
	color: #50575e;
}

.tributo-summary-row strong {
	color: #1d2327;
	font-size: 15px;
}

.tributo-summary-total {
	margin-top: 6px;
	padding-top: 12px;
	border-top: 1px solid #e2e4e7;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.tributo-summary-total strong {
	font-size: 18px;
	color: var(--tributo-primary);
}

/* Test modu uyarısı */
.tributo-testmode-notice {
	margin-bottom: 16px;
	padding: 12px 14px;
	background: #fcf9e8;
	border: 1px solid #f0e6a6;
	border-left: 4px solid #dba617;
	border-radius: 6px;
	font-size: 13px;
	color: #6a5b13;
}

.tributo-iframe {
	width: 100%;
	min-height: 480px;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
}

/* Doğrudan PayTR iFrame API: iframeResizer yüksekliği yönetir (sabit min yükseklik gerekmez). */
.tributo-iframe.is-direct {
	min-height: 360px;
	border: 0;
}

/* Sonuç ekranları */
.tributo-result {
	text-align: center;
	padding: 24px 8px;
}

.tributo-result-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 14px;
	font-size: 34px;
	color: #fff;
	border-radius: 50%;
}

.tributo-result-success .tributo-result-icon {
	background: #2e7d32;
}

.tributo-result-fail .tributo-result-icon {
	background: #b32d2e;
}

.tributo-result h3 {
	margin: 0 0 8px;
	font-size: 20px;
}

.tributo-result p {
	margin: 0 0 18px;
	color: #50575e;
}

/* Mobil */
@media ( max-width: 600px ) {
	.tributo-modal {
		max-width: 100%;
		max-height: 100vh;
		border-radius: 0;
		padding: 22px 18px;
	}

	.tributo-modal-overlay {
		padding: 0;
	}

	.tributo-presets,
	.tributo-card-grid {
		grid-template-columns: repeat( 2, 1fr );
	}

	.tributo-grid-2 {
		grid-template-columns: 1fr;
	}

	.tributo-iframe {
		min-height: 60vh;
	}
}
