/**
 * PD Affiliate – frontend stiliai.
 * Viskas apribota .pd-aff kontekstu: jokių globalių reset'ų ar body taisyklių,
 * kad nesugadintų temos (Woodmart / Elementor / Padykelis).
 */

.pd-aff {
	--pd-aff-fg: #14110f;
	--pd-aff-muted: #6d6a67;
	--pd-aff-line: #e3e0dc;
	--pd-aff-bg: #ffffff;
	--pd-aff-soft: #f6f4f1;
	--pd-aff-accent: #14110f;
	--pd-aff-ok: #1f7a4d;
	--pd-aff-warn: #a06b00;
	--pd-aff-err: #b3261e;
	--pd-aff-radius: 0;

	max-width: 1080px;
	margin: 0 auto;
	color: var(--pd-aff-fg);
	font-size: 15px;
	line-height: 1.55;
	box-sizing: border-box;
}

.pd-aff *,
.pd-aff *::before,
.pd-aff *::after {
	box-sizing: border-box;
}

/* --- Antraštės --------------------------------------------------------- */

.pd-aff-title,
.pd-aff-hero__title {
	margin: 0 0 12px;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
}

.pd-aff-hero {
	margin-bottom: 28px;
}

.pd-aff-hero__text {
	margin: 0;
	color: var(--pd-aff-muted);
	max-width: 62ch;
}

.pd-aff-header {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--pd-aff-line);
}

.pd-aff-header__eyebrow {
	display: block;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pd-aff-muted);
}

.pd-aff-header__title {
	margin: 4px 0 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.pd-aff-header__coupon-label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pd-aff-muted);
	margin-bottom: 4px;
}

/* --- Kopijavimo mygtukas ----------------------------------------------- */

.pd-aff-copy {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	padding: 10px 14px;
	background: var(--pd-aff-soft);
	border: 1px dashed var(--pd-aff-line);
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.pd-aff-copy__code {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.pd-aff-copy__hint {
	font-size: 12px;
	color: var(--pd-aff-muted);
}

.pd-aff-copy.is-copied {
	border-style: solid;
	border-color: var(--pd-aff-ok);
}

.pd-aff-coupon-inline {
	font-weight: 700;
	letter-spacing: 0.06em;
}

/* --- Tabai ------------------------------------------------------------- */

.pd-aff-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 24px;
	border-bottom: 1px solid var(--pd-aff-line);
}

.pd-aff-tab {
	padding: 12px 16px;
	text-decoration: none;
	color: var(--pd-aff-muted);
	font-weight: 600;
	font-size: 14px;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.pd-aff-tab:hover {
	color: var(--pd-aff-fg);
}

.pd-aff-tab.is-active {
	color: var(--pd-aff-fg);
	border-bottom-color: var(--pd-aff-accent);
}

.pd-aff-tab--logout {
	margin-left: auto;
	font-weight: 400;
}

/* --- Statistikos kortelės ---------------------------------------------- */

.pd-aff-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1px;
	background: var(--pd-aff-line);
	border: 1px solid var(--pd-aff-line);
	margin-bottom: 24px;
}

.pd-aff-stat {
	background: var(--pd-aff-bg);
	padding: 18px 20px;
}

.pd-aff-stat__label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-aff-muted);
	margin-bottom: 6px;
}

.pd-aff-stat__value {
	display: block;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.pd-aff-stat__value--accent {
	color: var(--pd-aff-ok);
}

/* --- Kortelės ---------------------------------------------------------- */

.pd-aff-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.pd-aff-card {
	background: var(--pd-aff-bg);
	border: 1px solid var(--pd-aff-line);
	padding: 22px;
	margin-bottom: 20px;
}

.pd-aff-cols .pd-aff-card {
	margin-bottom: 0;
}

.pd-aff-card--center {
	text-align: center;
	max-width: 560px;
	margin: 0 auto;
}

.pd-aff-card__title {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
}

.pd-aff-hr {
	border: 0;
	border-top: 1px solid var(--pd-aff-line);
	margin: 22px 0;
}

/* --- Sąrašai ----------------------------------------------------------- */

.pd-aff-deflist {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 16px;
	margin: 0;
}

.pd-aff-deflist dt {
	color: var(--pd-aff-muted);
	font-size: 14px;
}

.pd-aff-deflist dd {
	margin: 0;
	text-align: right;
	font-weight: 600;
}

.pd-aff-steps {
	margin: 0;
	padding-left: 20px;
}

.pd-aff-steps li {
	margin-bottom: 8px;
}

.pd-aff-balance {
	padding: 16px 0 20px;
	border-bottom: 1px solid var(--pd-aff-line);
	margin-bottom: 18px;
}

.pd-aff-balance__label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-aff-muted);
}

.pd-aff-balance__value {
	display: block;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
}

/* --- Lentelės ---------------------------------------------------------- */

.pd-aff-table-wrap {
	overflow-x: auto;
}

.pd-aff-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.pd-aff-table th {
	text-align: left;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pd-aff-muted);
	font-weight: 600;
	padding: 0 12px 8px 0;
	border-bottom: 1px solid var(--pd-aff-line);
	white-space: nowrap;
}

.pd-aff-table td {
	padding: 12px 12px 12px 0;
	border-bottom: 1px solid var(--pd-aff-line);
	vertical-align: middle;
}

.pd-aff-table tr:last-child td {
	border-bottom: 0;
}

/* --- Ženkliukai -------------------------------------------------------- */

.pd-aff-badge {
	display: inline-block;
	padding: 3px 9px;
	font-size: 12px;
	font-weight: 600;
	background: var(--pd-aff-soft);
	color: var(--pd-aff-muted);
	white-space: nowrap;
}

.pd-aff-badge--approved,
.pd-aff-badge--active {
	background: #e7f3ec;
	color: var(--pd-aff-ok);
}

.pd-aff-badge--pending,
.pd-aff-badge--requested {
	background: #fdf3e0;
	color: var(--pd-aff-warn);
}

.pd-aff-badge--rejected,
.pd-aff-badge--suspended {
	background: #fbe9e8;
	color: var(--pd-aff-err);
}

.pd-aff-badge--paid {
	background: #14110f;
	color: #fff;
}

/* --- Formos ------------------------------------------------------------ */

.pd-aff-form--narrow {
	max-width: 420px;
}

.pd-aff-fieldset {
	border: 1px solid var(--pd-aff-line);
	padding: 20px 22px 8px;
	margin: 0 0 20px;
}

.pd-aff-fieldset legend {
	padding: 0 8px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pd-aff-muted);
	font-weight: 600;
}

.pd-aff-grid {
	display: grid;
	gap: 0 16px;
}

.pd-aff-grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pd-aff-grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pd-aff-field {
	margin: 0 0 16px;
}

.pd-aff-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}

.pd-aff-field input[type="text"],
.pd-aff-field input[type="email"],
.pd-aff-field input[type="tel"],
.pd-aff-field input[type="password"],
.pd-aff-field select,
.pd-aff-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--pd-aff-line);
	background: #fff;
	font: inherit;
	font-size: 15px;
	color: var(--pd-aff-fg);
	border-radius: var(--pd-aff-radius);
}

.pd-aff-field input:focus,
.pd-aff-field select:focus,
.pd-aff-field textarea:focus {
	outline: 2px solid var(--pd-aff-accent);
	outline-offset: -2px;
}

.pd-aff-field input[readonly] {
	background: var(--pd-aff-soft);
	color: var(--pd-aff-muted);
}

.pd-aff-input--code {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pd-aff-field--check label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 14px;
}

.pd-aff-field--check input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.pd-aff-hint {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	color: var(--pd-aff-muted);
	font-weight: 400;
}

.pd-aff-req {
	color: var(--pd-aff-err);
}

.pd-aff-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Mygtukai ---------------------------------------------------------- */

.pd-aff-actions {
	margin: 20px 0 0;
}

.pd-aff-btn {
	display: inline-block;
	padding: 13px 26px;
	border: 1px solid var(--pd-aff-accent);
	background: transparent;
	color: var(--pd-aff-accent);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	border-radius: var(--pd-aff-radius);
}

.pd-aff-btn--primary {
	background: var(--pd-aff-accent);
	color: #fff;
}

.pd-aff-btn--primary:hover {
	opacity: 0.88;
	color: #fff;
}

.pd-aff-alt {
	margin: 16px 0 0;
	font-size: 14px;
	color: var(--pd-aff-muted);
}

.pd-aff-sep {
	margin: 0 6px;
	color: var(--pd-aff-line);
}

/* --- Pranešimai -------------------------------------------------------- */

.pd-aff-notice {
	padding: 14px 18px;
	margin: 0 0 20px;
	border-left: 3px solid var(--pd-aff-muted);
	background: var(--pd-aff-soft);
	font-size: 14px;
}

.pd-aff-notice ul {
	margin: 0;
	padding-left: 18px;
}

.pd-aff-notice ul li + li {
	margin-top: 4px;
}

.pd-aff-notice--error {
	border-left-color: var(--pd-aff-err);
	background: #fbe9e8;
}

.pd-aff-notice--success {
	border-left-color: var(--pd-aff-ok);
	background: #e7f3ec;
}

.pd-aff-notice--info {
	border-left-color: var(--pd-aff-warn);
	background: #fdf3e0;
}

.pd-aff-empty {
	color: var(--pd-aff-muted);
	margin: 0;
}

.pd-aff-reason {
	background: var(--pd-aff-soft);
	padding: 12px 16px;
	text-align: left;
}

/* --- Puslapiavimas ----------------------------------------------------- */

.pd-aff-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 18px;
}

.pd-aff-page {
	display: inline-block;
	min-width: 34px;
	padding: 7px 10px;
	text-align: center;
	border: 1px solid var(--pd-aff-line);
	text-decoration: none;
	color: var(--pd-aff-fg);
	font-size: 13px;
}

.pd-aff-page.is-current {
	background: var(--pd-aff-accent);
	border-color: var(--pd-aff-accent);
	color: #fff;
}

/* --- Mobilus ----------------------------------------------------------- */

@media (max-width: 640px) {
	.pd-aff-table thead {
		display: none;
	}

	.pd-aff-table,
	.pd-aff-table tbody,
	.pd-aff-table tr,
	.pd-aff-table td {
		display: block;
		width: 100%;
	}

	.pd-aff-table tr {
		border-bottom: 1px solid var(--pd-aff-line);
		padding: 10px 0;
	}

	.pd-aff-table td {
		border: 0;
		padding: 4px 0;
		display: flex;
		justify-content: space-between;
		gap: 16px;
	}

	.pd-aff-table td::before {
		content: attr(data-label);
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: var(--pd-aff-muted);
		flex: 0 0 auto;
	}

	.pd-aff-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.pd-aff-tab--logout {
		margin-left: 0;
	}
}
