/* ─── Private Logik Cookie Consent — shortcode content ──────────────
   Styles for the [private_logik_privacy_policy] and
   [private_logik_cookie_policy] output (policy body, data-request form,
   service accordion, cookie table, dark theme). Enqueued by
   PLC_Frontend::enqueue_content_style() only on pages that render one of
   those shortcodes — never site-wide. Banner/button styles live in
   cookie-popup.css.
   ────────────────────────────────────────────────────────────────── */

/* ─── Cookie policy spacing ─────────────────────────────────────── */

.plc-cookie-policy h2 {
	margin-top: 2em;
	margin-bottom: 0.6em;
}

.plc-cookie-policy p:has(.plc-reset-btn) {
	margin-top: 1.25em;
	margin-bottom: 1.75em;
}

/* ─── Privacy policy page output ────────────────────────────────── */

.plc-policy {
	width: 100%;
}

.plc-policy blockquote {
	border-left: 4px solid var(--plc-accent, #e0e0e0);
	margin: 0 0 1em;
	padding: 0.6em 1.2em;
	background: var(--plc-box-bg, #f9f9f9);
	border-radius: 0 6px 6px 0;
	font-style: italic;
	color: var(--plc-box-text, #555);
}

.plc-policy blockquote p {
	margin: 0;
}

/* ─── Radio button group ─────────────────────────────────────────── */

.plc-form-fieldset {
	border: none;
	margin: 0;
	padding: 0;
}

.plc-form-fieldset legend {
	font-size: 13.5px;
	font-weight: 600;
	color: #333;
	margin-bottom: 10px;
}

.plc-form-fieldset legend span {
	color: #c00;
}

.plc-radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.plc-radio-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
}

.plc-radio-label input[type="radio"] {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: #1a1a1a;
	cursor: pointer;
	margin: 0;
}

/* ─── Data request form ──────────────────────────────────────────── */

.plc-form-wrap {
	margin-top: 2em;
}

.plc-form-message {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 14px;
}

.plc-form-message--success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.plc-form-message--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

.plc-request-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.plc-form-row {
	display: flex;
	gap: 14px;
}

.plc-form-row--half .plc-form-field {
	flex: 1;
}

.plc-form-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.plc-form-field label {
	font-size: 13.5px;
	font-weight: 600;
	color: #333;
}

.plc-form-field label span {
	color: #c00;
}

.plc-form-field input[type="text"],
.plc-form-field input[type="email"],
.plc-form-field select,
.plc-form-field textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 7px;
	font-size: 14px;
	font-family: inherit;
	color: #1a1a1a;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.plc-form-field input:focus,
.plc-form-field select:focus,
.plc-form-field textarea:focus {
	outline: none;
	border-color: #1a1a1a;
	box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.plc-form-field textarea {
	resize: vertical;
	min-height: 90px;
}

.plc-form-submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 24px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	align-self: flex-start;
	transition: background 0.18s ease;
}

.plc-form-submit:hover {
	background: #333;
}

.plc-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.plc-submit-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: plc-spin 0.7s linear infinite;
}

@keyframes plc-spin {
	to { transform: rotate(360deg); }
}

.plc-form-note {
	font-size: 12px;
	color: #888;
	margin: 0;
}

/* ─── Cookie service accordion ──────────────────────────────────── */

.plc-accordion-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 1.5em;
}

.plc-accordion {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.plc-accordion-summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 16px;
	cursor: pointer;
	list-style: none;
	user-select: none;
	background: #f9fafb;
	transition: background 0.15s ease;
}

.plc-accordion-summary::-webkit-details-marker {
	display: none;
}

.plc-accordion-summary::marker {
	display: none;
}

.plc-accordion-summary:hover {
	background: #f1f3f5;
}

.plc-accordion-title {
	font-weight: 600;
	font-size: 14px;
	color: #111;
	flex: 1;
}

.plc-accordion-meta {
	font-size: 12px;
	color: #888;
	white-space: nowrap;
}

.plc-accordion-chevron {
	flex-shrink: 0;
	color: #666;
	transition: transform 0.2s ease;
}

.plc-accordion[open] .plc-accordion-chevron {
	transform: rotate(180deg);
}

.plc-accordion[open] .plc-accordion-summary {
	background: #f1f3f5;
	border-bottom: 1px solid #e5e7eb;
}

.plc-accordion-body {
	padding: 16px;
	background: #fff;
}

.plc-accordion-body p {
	margin: 0 0 12px;
	font-size: 14px;
	color: #444;
}

.plc-table-wrap {
	overflow-x: auto;
}

/* ─── Cookie / consent reset button ─────────────────────────────── */

.plc-reset-btn {
	padding: 8px 18px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	transition: background 0.18s ease;
}

.plc-reset-btn:hover {
	background: #333;
}

/* ─── Cookie policy table ────────────────────────────────────────── */

.plc-cookie-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	margin-bottom: 1em;
}

.plc-cookie-table th {
	background: #f5f5f5;
	text-align: left;
	padding: 8px 10px;
	border: 1px solid #e0e0e0;
	font-weight: 600;
}

.plc-cookie-table td {
	padding: 7px 10px;
	border: 1px solid #e8e8e8;
	vertical-align: top;
}

.plc-cookie-table code {
	background: #f0f0f0;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 12px;
}
/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 520px) {
	.plc-form-row,
	.plc-form-row--half {
		flex-direction: column;
	}

	.plc-cookie-table {
		font-size: 12px;
	}

	.plc-cookie-table th,
	.plc-cookie-table td {
		padding: 6px 8px;
	}
}

/* ─── Heading size caps (override oversized theme H1/H2/H3) ──────── */

.plc-policy h1,
.plc-cookie-policy h1 {
	font-size: 1.9em !important;
	line-height: 1.25 !important;
	margin-top: 1.2em !important;
	margin-bottom: 0.5em !important;
}

.plc-policy h2,
.plc-cookie-policy h2 {
	font-size: 1.45em !important;
	line-height: 1.3 !important;
	margin-top: 1.6em !important;
	margin-bottom: 0.5em !important;
	letter-spacing: normal !important;
}

.plc-policy h3,
.plc-cookie-policy h3 {
	font-size: 1.15em !important;
	line-height: 1.35 !important;
	margin-top: 1.2em !important;
	margin-bottom: 0.4em !important;
	letter-spacing: normal !important;
}

@media (max-width: 640px) {
	.plc-policy h1,
	.plc-cookie-policy h1 { font-size: 1.6em !important; }

	.plc-policy h2,
	.plc-cookie-policy h2 { font-size: 1.25em !important; }

	.plc-policy h3,
	.plc-cookie-policy h3 { font-size: 1.05em !important; }
}

/* ─── Dark theme ───────────────────────────────────────────────────
   Retint the blockquote box + form/table/accordion borders so they read
   correctly on dark site backgrounds. Does NOT add a container/text
   background — text color is inherited from the site's theme.
   ────────────────────────────────────────────────────────────────── */

/* Dark-mode blockquote: match the accordion box exactly (full border,
   rounded, translucent-white background). Fixed values — custom Box/Accent
   colors from the admin only apply in Light mode (see wrap_theme() in
   class-plc-shortcode.php). */
.plc-theme-dark .plc-policy blockquote,
.plc-theme-dark .plc-cookie-policy blockquote {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-left: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 13px 16px;
	color: inherit;
}

.plc-theme-dark .plc-form-field input[type="text"],
.plc-theme-dark .plc-form-field input[type="email"],
.plc-theme-dark .plc-form-field select,
.plc-theme-dark .plc-form-field textarea {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.2);
	color: inherit;
}
.plc-theme-dark .plc-form-field input::placeholder,
.plc-theme-dark .plc-form-field textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.plc-theme-dark .plc-form-field input:focus,
.plc-theme-dark .plc-form-field select:focus,
.plc-theme-dark .plc-form-field textarea:focus {
	border-color: var(--plc-accent, rgba(255, 255, 255, 0.5));
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Accent-aware focus ring in light mode too, when an accent is set */
.plc-theme-wrap[style*="--plc-accent"] .plc-form-field input:focus,
.plc-theme-wrap[style*="--plc-accent"] .plc-form-field select:focus,
.plc-theme-wrap[style*="--plc-accent"] .plc-form-field textarea:focus {
	border-color: var(--plc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--plc-accent) 18%, transparent);
}
.plc-theme-dark .plc-form-message--success {
	background: rgba(16, 185, 129, 0.12);
	color: #6ee7b7;
	border-color: rgba(110, 231, 183, 0.35);
}
.plc-theme-dark .plc-form-message--error {
	background: rgba(239, 68, 68, 0.12);
	color: #fca5a5;
	border-color: rgba(252, 165, 165, 0.35);
}
.plc-theme-dark .plc-accordion { border-color: rgba(255, 255, 255, 0.15); }
.plc-theme-dark .plc-accordion-summary { background: rgba(255, 255, 255, 0.05); }
.plc-theme-dark .plc-accordion-summary:hover,
.plc-theme-dark .plc-accordion[open] .plc-accordion-summary {
	background: rgba(255, 255, 255, 0.09);
	border-bottom-color: rgba(255, 255, 255, 0.15);
}
.plc-theme-dark .plc-accordion-title,
.plc-theme-dark .plc-accordion-meta,
.plc-theme-dark .plc-accordion-chevron,
.plc-theme-dark .plc-accordion-body p { color: inherit; }
.plc-theme-dark .plc-accordion-body { background: transparent; }
.plc-theme-dark .plc-cookie-table th {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.15);
	color: inherit;
}
.plc-theme-dark .plc-cookie-table td {
	border-color: rgba(255, 255, 255, 0.12);
	color: inherit;
}
.plc-theme-dark .plc-cookie-table code {
	background: rgba(255, 255, 255, 0.1);
	color: inherit;
}
