/*
 * Rebrendovanje Freemius-ovih ugrađenih Account i Pricing/Upgrade stranica
 * da vizuelno liče na Discount Rules Box admin dizajn (isti primary plavi
 * ton, zaobljeni card-ovi, isti font-stack).
 *
 * Ove dvije stranice generiše Freemius SDK direktno (vendor/freemius/wordpress-sdk/
 * templates/account.php i pricing.php), pa se ne mogu editovati kroz naš PHP —
 * jedini način da se rebrenduju je CSS override koji cilja SDK-ove stvarne
 * WordPress admin klase (.postbox, .nav-tab, .button, .fs-tag, itd, potvrđene
 * čitanjem templates/account.php).
 */

:root {
	--drbu-fs-primary: #2563eb;
	--drbu-fs-primary-hover: #1d4ed8;
	--drbu-fs-bg: #f8fafc;
	--drbu-fs-card-bg: #ffffff;
	--drbu-fs-border: #e2e8f0;
	--drbu-fs-text-main: #0f172a;
	--drbu-fs-text-muted: #64748b;
	--drbu-fs-accent-dark: #059669;
	--drbu-fs-radius: 16px;
	--drbu-fs-btn-radius: 100px;
	--drbu-fs-shadow: 0 10px 30px -12px rgba(30, 64, 175, 0.12);
	/* Isti self-hosted font-ovi kao discount-rules-box-upsell-admin.css
	   (@font-face definisan tamo — obe CSS datoteke se uvek učitavaju
	   zajedno na ovim stranicama, vidi DRBU_Core::enqueue_admin_assets()). */
	--drbu-fs-font: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--drbu-fs-font-display: 'Outfit', 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Zajednički wrapper --- */
.wrap.fs-section {
	font-family: var(--drbu-fs-font);
	color: var(--drbu-fs-text-main);
	max-width: 1100px;
}

/* --- Tabovi (Account / Add-Ons / Upgrade / Free Trial) --- */
.wrap.fs-section .nav-tab-wrapper {
	border-bottom: 1px solid var(--drbu-fs-border);
	margin-bottom: 20px;
}

.wrap.fs-section .nav-tab {
	font-family: var(--drbu-fs-font);
	font-weight: 700;
	font-size: 13px;
	color: var(--drbu-fs-text-muted);
	border: none;
	background: transparent;
	padding: 10px 16px;
	border-radius: var(--drbu-fs-radius) var(--drbu-fs-radius) 0 0;
}

.wrap.fs-section .nav-tab-active,
.wrap.fs-section .nav-tab-active:focus,
.wrap.fs-section .nav-tab-active:hover {
	color: var(--drbu-fs-primary);
	background: #eff6ff;
	border-bottom: 2px solid var(--drbu-fs-primary);
}

/* --- Card-ovi (postbox) --- */
.wrap.fs-section .postbox {
	border: 1px solid var(--drbu-fs-border);
	border-radius: var(--drbu-fs-radius);
	box-shadow: var(--drbu-fs-shadow);
	background: var(--drbu-fs-card-bg);
	overflow: hidden;
}

.wrap.fs-section .postbox > h3 {
	font-family: var(--drbu-fs-font-display);
	font-weight: 800;
	font-size: 14px;
	color: var(--drbu-fs-text-main);
	background: var(--drbu-fs-bg);
	border-bottom: 1px solid var(--drbu-fs-border);
	padding: 14px 18px;
}

/* --- Tabela sa detaljima naloga --- */
.wrap.fs-section .fs-key-value-table {
	font-family: var(--drbu-fs-font);
}

.wrap.fs-section .fs-key-value-table tr.alternate {
	background: var(--drbu-fs-bg);
}

/* --- Dugmad — zaobljena kao u pluginu (pill) --- */
.wrap.fs-section .button,
.wrap.fs-section .button-primary {
	border-radius: var(--drbu-fs-btn-radius);
	font-weight: 700;
	font-family: var(--drbu-fs-font);
}

.wrap.fs-section .button-primary {
	background: var(--drbu-fs-primary);
	border-color: var(--drbu-fs-primary-hover);
}

.wrap.fs-section .button-primary:hover,
.wrap.fs-section .button-primary:focus {
	background: var(--drbu-fs-primary-hover);
	border-color: var(--drbu-fs-primary-hover);
}

/*
 * "Account Details" header akcije (Disconnect • Sync • itd) — po defaultu
 * plain-text linkovi razdvojeni sa "•", teško uočljivi. Selektori su
 * Freemius-ovi sopstveni (potvrđeni čitanjem templates/account.php i
 * account/partials/disconnect-button.php): ".fs-header-actions" je wrapper
 * oko cele akcione trake, ".fs-button-inline" je ISKLJUČIVO Disconnect
 * dugme (koristi se samo na tom jednom mestu u celom SDK-u).
 */
.wrap.fs-section .postbox .fs-header-actions ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.wrap.fs-section .postbox .fs-header-actions li {
	list-style: none;
}

/* "•" separator li-jevi (samo &bull; tekst, bez linka) više nisu potrebni
   kad su akcije već vizuelno odvojene kao zasebni dugmići. */
.wrap.fs-section .postbox .fs-header-actions li:not(:has(a)) {
	display: none;
}

.wrap.fs-section .postbox .fs-header-actions a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--drbu-fs-bg);
	border: 1px solid var(--drbu-fs-border);
	border-radius: var(--drbu-fs-btn-radius);
	padding: 6px 14px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--drbu-fs-text-main);
	text-decoration: none;
}

.wrap.fs-section .postbox .fs-header-actions a:hover {
	border-color: var(--drbu-fs-primary);
	color: var(--drbu-fs-primary);
}

/* Disconnect / Deactivate License su destruktivne akcije — crveno, da se
   jasno razlikuju od Sync i ostalih neutralnih akcija. */
.wrap.fs-section .postbox .fs-header-actions .fs-button-inline,
.wrap.fs-section .postbox .fs-header-actions .fs-deactivate-license {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

.wrap.fs-section .postbox .fs-header-actions .fs-button-inline:hover,
.wrap.fs-section .postbox .fs-header-actions .fs-deactivate-license:hover {
	background: #fee2e2;
	border-color: #fca5a5;
	color: #991b1b;
}

/*
 * "Plan" red u Account Details tabeli (npr. "PRO Trial ... Expires in 4
 * weeks ... Upgrade") — po defaultu izgleda kao svaki drugi običan red u
 * tabeli i lako se izgubi. "tr.fs-field-plan" je Freemius-ova sopstvena
 * klasa (templates/account.php: "fs-field-<id>", id === 'plan').
 */
.wrap.fs-section .fs-key-value-table tr.fs-field-plan td {
	background: var(--drbu-fs-bg) !important;
	padding: 16px 14px;
	border-left: 3px solid var(--drbu-fs-primary);
}

.wrap.fs-section .fs-key-value-table tr.fs-field-plan code {
	font-size: 13px;
	font-weight: 700;
}

.wrap.fs-section .fs-key-value-table tr.fs-field-plan .fs-tag {
	font-size: 11.5px;
	padding: 4px 12px;
	margin-left: 8px;
}

.wrap.fs-section .fs-key-value-table tr.fs-field-plan .button-upgrade {
	font-size: 13px;
	font-weight: 700;
	padding: 8px 20px !important;
}

.wrap.fs-section .fs-key-value-table tr.fs-field-plan .button-primary.button-upgrade {
	box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.5);
}

/* --- Statusni "tag" oznake (Free/Premium/Trial/Expired) --- */
.wrap.fs-section .fs-tag {
	border-radius: 100px;
	font-weight: 800;
	font-size: 10.5px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 2px 10px;
}

.wrap.fs-section .fs-tag.fs-success {
	background: #dcfce7;
	color: #15803d;
}

.wrap.fs-section .fs-tag.fs-warn {
	background: #fef9c3;
	color: #92400e;
}

.wrap.fs-section .fs-tag.fs-error {
	background: #fee2e2;
	color: #b91c1c;
}

/* --- Freemius-ov sopstveni "Activate/Change License" modal dijalog --- */
.fs-modal .fs-modal-dialog {
	font-family: var(--drbu-fs-font);
	border-radius: var(--drbu-fs-radius);
	overflow: hidden;
	box-shadow: var(--drbu-fs-shadow);
}

.fs-modal .fs-modal-header {
	background: var(--drbu-fs-bg);
	border-bottom: 1px solid var(--drbu-fs-border);
}

.fs-modal .fs-modal-header h4 {
	font-family: var(--drbu-fs-font-display);
	font-weight: 800;
	color: var(--drbu-fs-text-main);
}

.fs-modal .fs-modal-footer {
	background: var(--drbu-fs-card-bg);
	border-top: 1px solid var(--drbu-fs-border);
}

.fs-modal .fs-modal-footer .button {
	border-radius: var(--drbu-fs-btn-radius);
	font-weight: 700;
}

.fs-modal .fs-modal-footer .button-primary {
	background: var(--drbu-fs-primary);
	border-color: var(--drbu-fs-primary-hover);
}

.fs-modal .fs-modal-footer .button-primary:hover {
	background: var(--drbu-fs-primary-hover);
}

.fs-modal input.fs-license-key,
.fs-modal input.fs-available-license-key {
	border-radius: 6px;
	font-family: monospace;
}

/*
 * Freemius-ov pricing widget (Upgrade stranica) sam iscrtava sopstveni
 * logo+naslov blok unutar svog klijentski-renderovanog sadržaja
 * (<section class="fs-plugin-title-and-logo">) — redundantan sa našim
 * DRBU_Core::maybe_render_freemius_page_header() headerom iznad. Widget je
 * učitan iz eksternog JS bundle-a (freemius-pricing.js) i ne može se
 * editovati kroz PHP, pa se ovaj blok sakriva čisto preko CSS-a.
 */
.fs-plugin-title-and-logo {
	display: none !important;
}

/* "Test Pro Free for 30 Days" banner iznad Freemius pricing widget-a — isti
   tekst i stil kao "pricing-banner" na landing stranici. */
.drbu-fs-banner {
	margin: 16px 0 4px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: var(--drbu-fs-radius);
	padding: 16px 22px;
	font-family: var(--drbu-fs-font);
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--drbu-fs-primary-hover);
}

.drbu-fs-banner strong {
	color: #1e40af;
}

/*
 * Stilovi za sadržaj koji `initFreemiusPricingPatch()`
 * (discount-rules-box-upsell-admin.js) ubacuje u Freemius-ov pricing widget
 * posle renderovanja — vidi opširan komentar tamo za kontekst/rizike ove
 * privremene zakrpe. Selektori (.fs-plan-support, .fs-package, itd.) su
 * Freemius-ovi sopstveni, potvrđeni čitanjem freemius-pricing.js.
 */
.fs-package .fs-plan-support.drbu-fs-trial-note {
	color: var(--drbu-fs-accent-dark) !important;
	font-weight: 700;
}

.drbu-fs-feature {
	position: relative;
}

.drbu-fs-tagline {
	margin: 10px 13px 0;
	font-size: 12px;
	color: var(--drbu-fs-text-muted);
	line-height: 1.5;
}

.fs-package.drbu-fs-featured-card {
	position: relative;
}

.drbu-fs-badge {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--drbu-fs-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 4px 12px;
	border-radius: 100px;
	box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
	z-index: 2;
}
