/* ============================================================
   Nefesat — Direct Checkout Modal (Product Page)
   ============================================================ */

/* ---------- Modal shell ---------- */
.nefesat-dc-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.nefesat-dc-modal.active {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
}
.nefesat-dc-modal__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}
.nefesat-dc-modal__container {
	position: relative;
	width: 100%;
	max-width: 520px;
	background: var(--nfs-white, #fff);
	border-radius: var(--nfs-radius-lg, 4px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	animation: ndc-slide-up 0.3s ease;
}
@keyframes ndc-slide-up {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */
.nefesat-dc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--nfs-border, #e0e0e0);
}
.nefesat-dc-modal__header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--nfs-dark, #1a1a1a);
}
.nefesat-dc-modal__close {
	background: none;
	border: none;
	font-size: 28px;
	color: var(--nfs-text-light, #666);
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
	transition: color 0.15s;
}
.nefesat-dc-modal__close:hover { color: var(--nfs-dark, #1a1a1a); }

/* ---------- Body ---------- */
.nefesat-dc-modal__body {
	padding: 24px;
	position: relative;
}

/* ---------- Product card ---------- */
.nefesat-dc-product {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	background: var(--nfs-bg-light, #f7f7f7);
	border-radius: var(--nfs-radius-lg, 4px);
	margin-bottom: 24px;
}
.nefesat-dc-product__img {
	width: 60px;
	height: 60px;
	border-radius: var(--nfs-radius-lg, 4px);
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--nfs-border, #e0e0e0);
}
.nefesat-dc-product__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.nefesat-dc-product__name {
	font-size: 15px;
	font-weight: 600;
	color: var(--nfs-dark, #1a1a1a);
}
.nefesat-dc-product__price {
	font-size: 16px;
	font-weight: 700;
	color: var(--nfs-primary, #96ae6f);
}

/* ---------- Auth tabs ---------- */
.nefesat-dc-auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 1px solid var(--nfs-border, #e0e0e0);
	border-radius: var(--nfs-radius-lg, 4px);
	overflow: hidden;
	margin-bottom: 24px;
}
.nefesat-dc-auth-tab {
	padding: 12px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--nfs-text-light, #666);
	background: var(--nfs-bg-light, #f7f7f7);
	border: none;
	cursor: pointer;
	transition: all 0.15s;
}
.nefesat-dc-auth-tab.active {
	color: var(--nfs-primary, #96ae6f);
	background: var(--nfs-white, #fff);
}
.nefesat-dc-auth-tab:hover:not(.active) { color: var(--nfs-text, #333); }

/* ---------- Auth panels ---------- */
.nefesat-dc-auth-panel { display: none; }
.nefesat-dc-auth-panel.active { display: block; }

/* ---------- Error box ---------- */
.nefesat-dc-form-error {
	padding: 12px 16px;
	background: #fef2f0;
	border-left: 3px solid var(--nfs-danger, #d14836);
	border-radius: var(--nfs-radius-lg, 4px);
	font-size: 14px;
	color: var(--nfs-danger, #d14836);
	margin-bottom: 16px;
}

/* ---------- Section title ---------- */
.nefesat-dc-section-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--nfs-dark, #1a1a1a);
	margin: 24px 0 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--nfs-border, #e0e0e0);
}
.nefesat-dc-section-title:first-child { margin-top: 0; }

/* ---------- Gateway list ---------- */
.nefesat-dc-gateway-list { margin-bottom: 12px; }

.nefesat-dc-gateway {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--nfs-border, #e0e0e0);
	border-radius: var(--nfs-radius-lg, 4px);
	margin-bottom: 8px;
	cursor: pointer;
	transition: border-color 0.15s;
}
.nefesat-dc-gateway:last-child { margin-bottom: 0; }
.nefesat-dc-gateway:hover,
.nefesat-dc-gateway.selected {
	border-color: var(--nfs-primary, #96ae6f);
}
.nefesat-dc-gateway input[type="radio"] { accent-color: var(--nfs-primary, #96ae6f); }
.nefesat-dc-gateway__label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--nfs-text, #333);
}
.nefesat-dc-gateway__icon img { max-height: 24px; width: auto; }
.nefesat-dc-gateway__desc {
	width: 100%;
	padding-left: 26px;
	font-size: 13px;
	color: var(--nfs-text-light, #666);
	line-height: 1.5;
}
.nefesat-dc-no-gateways {
	padding: 16px;
	background: #fff3e0;
	border-radius: var(--nfs-radius-lg, 4px);
	color: #e65100;
	font-size: 14px;
	text-align: center;
}

/* ---------- İndirimli fiyat bloğu (WooCommerce + popup + kartlar) ---------- */
.nefesat-price-stack {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	line-height: 1.35;
}
.nefesat-price-stack__current {
	font-size: 1.15em;
	font-weight: 700;
	color: var(--nfs-primary, #96ae6f);
}
.nefesat-price-stack__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.88em;
	font-weight: 500;
}
.nefesat-price-stack__regular {
	color: var(--nfs-text-light, #666);
	opacity: 0.9;
}
.nefesat-price-stack__pct {
	display: inline-block;
	font-size: 0.95em;
	font-weight: 700;
	color: #b71c1c;
	background: #ffebee;
	padding: 2px 8px;
	border-radius: var(--nfs-radius, 4px);
}

.nefesat-dc-product__price .nefesat-price-stack {
	max-width: 100%;
}
.nefesat-dc-product__price .nefesat-price-stack__current {
	font-size: 1.05em;
}

/* ---------- Order total ---------- */
.nefesat-dc-order-total {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	background: var(--nfs-bg-light, #f7f7f7);
	border-radius: var(--nfs-radius-lg, 4px);
	margin-bottom: 16px;
	font-size: 16px;
	font-weight: 600;
	color: var(--nfs-dark, #1a1a1a);
}
.nefesat-dc-order-total strong {
	color: var(--nfs-primary, #96ae6f);
	font-size: 16px;
	font-weight: 700;
	text-align: right;
	max-width: 58%;
}
.nefesat-dc-order-total strong .nefesat-price-stack {
	align-items: flex-end;
	margin-left: auto;
}
.nefesat-dc-order-total strong .nefesat-price-stack__current {
	font-size: 1.1em;
}

/* ---------- Place-order button ---------- */
.nefesat-dc-place-order-btn { margin-bottom: 12px; }

/* ---------- Yasal onaylar (popup + ödeme sayfası) ---------- */
.nefesat-legal-consents {
	margin-bottom: 16px;
}
.nefesat-legal-consents__title {
	margin-top: 8px;
}
.nefesat-legal-consents__hint {
	font-size: 12px;
	color: var(--nfs-text-light, #666);
	margin: -8px 0 14px;
	line-height: 1.45;
}
.nefesat-legal-consents__row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 12px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--nfs-text, #333);
}
.nefesat-legal-consents__cb {
	margin-top: 3px;
	flex-shrink: 0;
	accent-color: var(--nfs-primary, #96ae6f);
}
.nefesat-legal-consents__label {
	cursor: pointer;
	flex: 1;
}
.nefesat-legal-consents__label a {
	color: var(--nfs-primary, #96ae6f);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.nefesat-legal-consents__label a:hover {
	color: var(--nfs-dark, #1a1a1a);
}
.nefesat-legal-consents--invalid {
	padding: 10px 12px;
	border-radius: var(--nfs-radius-lg, 4px);
	border: 1px solid var(--nfs-danger, #d14836);
	background: #fff8f7;
}

/* ---------- Terms line ---------- */
.nefesat-dc-terms {
	font-size: 12px;
	color: var(--nfs-text-light, #666);
	text-align: center;
	margin: 0;
}
.nefesat-dc-terms a { color: var(--nfs-primary, #96ae6f); text-decoration: underline; }

/* ---------- Loading overlay ---------- */
.nefesat-dc-loading {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.92);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 10;
}
.nefesat-dc-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--nfs-border, #e0e0e0);
	border-top-color: var(--nfs-primary, #96ae6f);
	border-radius: 50%;
	animation: ndc-spin 0.8s linear infinite;
	margin-bottom: 12px;
}
@keyframes ndc-spin { to { transform: rotate(360deg); } }
.nefesat-dc-loading p {
	font-size: 14px;
	color: var(--nfs-text-light, #666);
	margin: 0;
}

/* ---------- Already-purchased badge (single product page) ---------- */
.nefesat-dc-purchased {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: flex-start;
	gap: 12px;
	text-align: left;
	max-width: 100%;
	box-sizing: border-box;
}
.nefesat-dc-purchased__text {
	display: inline-block;
	padding: 10px 16px;
	background: #e8f5e9;
	color: #2e7d32;
	border-radius: var(--nfs-radius-lg, 4px);
	font-size: 14px;
	font-weight: 500;
	margin: 0;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
}
.nefesat-dc-purchased__btn {
	display: inline-block !important;
	width: auto !important;
	max-width: 100%;
}

/* ---------- Already-purchased info (inside modal) ---------- */
.nefesat-dc-purchased-info {
	text-align: center;
	padding: 24px 16px;
}
.nefesat-dc-purchased-info__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 28px;
	margin-bottom: 16px;
}
.nefesat-dc-purchased-info p {
	font-size: 16px;
	font-weight: 500;
	color: var(--nfs-dark, #1a1a1a);
	margin: 0 0 20px;
}

/* ---------- Loop "Videolarıma Git" button ---------- */
.nefesat-dc-go-videos {
	background: #e8f5e9 !important;
	color: #2e7d32 !important;
	border: none !important;
	font-weight: 600 !important;
}
.nefesat-dc-go-videos:hover {
	background: #c8e6c9 !important;
}

/* ---------- Shortcode / Fusion element: içerik genişliği (Avada flex kolonlarında tam genişlik önleme) ---------- */
.nefesat-dc-shortcode-wrap {
	display: inline-block !important;
	width: auto !important;
	max-width: 100% !important;
	margin-top: 20px;
	vertical-align: top;
	align-self: flex-start !important;
	flex: 0 0 auto !important;
	box-sizing: border-box;
}

/* Avada kolon / builder sarmalayıcıları */
.fusion-column .nefesat-dc-shortcode-wrap,
.fusion-builder-column .nefesat-dc-shortcode-wrap,
.fusion-layout-column .nefesat-dc-shortcode-wrap,
.fusion-fullwidth .nefesat-dc-shortcode-wrap {
	display: inline-block !important;
	width: auto !important;
	max-width: 100% !important;
}

/* ---------- Shortcode “buton” (a veya button; Avada genelde button’a width:100% verir) ---------- */
a.nefesat-dc-shortcode-btn {
	text-decoration: none !important;
}
.nefesat-dc-shortcode-btn {
	display: inline-block !important;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	padding: 14px 32px;
	margin: 0 !important;
	border-radius: var(--nfs-radius, 6px);
	border: 2px solid transparent;
	line-height: 1.4;
	text-align: center;
	transition: all 0.2s ease;
	letter-spacing: 0.3px;
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	box-sizing: border-box;
}

/* tema="primary" (varsayılan) */
.nefesat-dc-shortcode-btn--primary {
	background: var(--nfs-primary, #96ae6f);
	color: #fff;
	border-color: var(--nfs-primary, #96ae6f);
}
.nefesat-dc-shortcode-btn--primary:hover {
	background: var(--nfs-primary-dark, #7d9559);
	border-color: var(--nfs-primary-dark, #7d9559);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(150, 174, 111, 0.35);
}

/* tema="white" */
.nefesat-dc-shortcode-btn--white {
	background: #fff;
	color: var(--nfs-dark, #1a1a1a);
	border-color: var(--nfs-border, #e0e0e0);
}
.nefesat-dc-shortcode-btn--white:hover {
	background: var(--nfs-bg-light, #f7f7f7);
	border-color: var(--nfs-primary, #96ae6f);
	color: var(--nfs-primary, #96ae6f);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- Input error ---------- */
.nefesat-input--error { border-color: var(--nfs-danger, #d14836) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.nefesat-dc-modal.active {
		padding: 0;
		align-items: stretch;
	}
	.nefesat-dc-modal__container {
		max-width: none;
		border-radius: 0;
		min-height: 100vh;
	}
	.nefesat-dc-modal__body { padding: 20px 16px; }
	.nefesat-dc-shortcode-wrap {
		width: fit-content !important;
		max-width: 100% !important;
	}
	.nefesat-dc-shortcode-btn {
		font-size: 14px;
		padding: 12px 20px;
		width: fit-content !important;
		max-width: 100% !important;
		text-align: center;
	}
}

/* ---------- Grouped Product — Modül Listesi (Mağaza Kartı) ---------- */
.nefesat-grouped-modules {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 8px;
}
.nefesat-grouped-modules__row {
	padding: 6px 0;
	border-bottom: 1px dashed #e8e8e8;
	font-size: 12px;
	line-height: 1.5;
}
.nefesat-grouped-modules__row:last-child {
	border-bottom: none;
}
.nefesat-grouped-modules__name {
	color: #555;
	font-weight: 500;
	display: block;
}
.nefesat-grouped-modules__price {
	color: #1a1a2e;
	font-weight: 700;
	display: block;
	font-size: 13px;
}
.nefesat-grouped-modules__price del {
	color: #999;
	font-weight: 400;
	font-size: 11px;
	text-decoration: line-through;
	margin-right: 4px;
}
.nefesat-grouped-modules__price del .woocommerce-Price-amount {
	font-size: inherit;
}
.nefesat-grouped-modules__price ins {
	text-decoration: none;
}
.nefesat-grouped-modules__price .woocommerce-Price-amount {
	font-size: 13px;
}

/* WC kart icinde tasmayi onle */
.products .product .nefesat-grouped-modules,
.woocommerce ul.products li.product .nefesat-grouped-modules {
	max-width: 100% !important;
	overflow: hidden !important;
}
