/* ============================================================
   PD247 COMPLAINT GENERATOR — STYLES v2.0
   ============================================================ */

.pdc-tool,
.pdc-tool * {
	box-sizing: border-box;
}

.pdc-tool {
	--pdc-primary: #005ea2;
	--pdc-secondary: #112e51;
	--pdc-accent: #cd2026;
	--pdc-light: #f0f7ff;
	--pdc-dark: #1b1b1b;
	--pdc-border: #d7e3ef;
	--pdc-muted: #6b7280;
	--pdc-ok: #0f766e;
	--pdc-bg: #ffffff;
	margin: 28px 0 42px;
	color: var(--pdc-dark);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.pdc-page-header {
	text-align: center;
	padding-top: 12px;
}

.pdc-page-title {
	margin: 0 0 10px;
}

.pdc-page-subtitle {
	max-width: 780px;
	margin: 0 auto 22px;
	color: #4b5563;
	font-size: 1.03rem;
	line-height: 1.65;
}

.pdc-page-intro {
	margin-bottom: 24px;
}

/* ============================================================
   CARD + TOPBAR
   ============================================================ */

.pdc-card {
	border: 1px solid var(--pdc-border);
	border-radius: 14px;
	background: var(--pdc-bg);
	box-shadow: 0 8px 24px rgba(17, 46, 81, 0.05);
	overflow: hidden;
}

.pdc-topbar {
	padding: 20px 22px;
	background: linear-gradient(135deg, var(--pdc-primary), var(--pdc-secondary));
	color: #fff;
}

.pdc-topbar h2 {
	margin: 0 0 8px;
	font-size: 1.35rem;
}

.pdc-topbar p {
	margin: 0;
	opacity: 0.95;
	line-height: 1.6;
}

/* ============================================================
   STEP INDICATOR
   ============================================================ */

.pdc-step-indicator {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	padding: 18px 22px 0;
	background: #fff;
}

.pdc-step {
	text-align: center;
	padding: 10px 12px;
	background: #e8f0f8;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--pdc-secondary);
}

.pdc-step.is-active {
	background: var(--pdc-primary);
	color: #fff;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.pdc-layout {
	display: grid;
	grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
	align-items: start;
}

.pdc-inputs {
	padding: 24px;
	background: var(--pdc-light);
	border-right: 1px solid var(--pdc-border);
}

.pdc-results {
	padding: 24px;
	background: #fff;
}

.pdc-section-title {
	margin: 0 0 16px;
	color: var(--pdc-secondary);
	font-size: 1.08rem;
}

.pdc-section-title--spaced {
	margin-top: 22px;
}

/* ============================================================
   FORM
   ============================================================ */

.pdc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.pdc-form-group {
	margin-bottom: 18px;
}

.pdc-form-group--spaced {
	margin-top: 18px;
}

.pdc-label {
	display: block;
	margin-bottom: 7px;
	font-weight: 700;
	color: var(--pdc-secondary);
	font-size: 0.95rem;
}

.pdc-hint {
	display: block;
	margin-top: 6px;
	font-size: 0.84rem;
	color: var(--pdc-muted);
	line-height: 1.5;
}

.pdc-tool input[type="text"],
.pdc-tool input[type="email"],
.pdc-tool input[type="tel"],
.pdc-tool input[type="date"],
.pdc-tool select,
.pdc-tool textarea {
	width: 100%;
	padding: 12px 14px !important;
	border: 1px solid #c8d6e5;
	border-radius: 10px;
	font-size: 1rem;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pdc-tool textarea {
	resize: vertical;
	min-height: 110px;
}

.pdc-tool input:focus,
.pdc-tool select:focus,
.pdc-tool textarea:focus {
	outline: none;
	border-color: var(--pdc-primary);
	box-shadow: 0 0 0 3px rgba(0, 94, 162, 0.15);
}

.pdc-tool input.is-invalid,
.pdc-tool textarea.is-invalid,
.pdc-tool select.is-invalid {
	border-color: var(--pdc-accent);
	background: #fff7f7;
}

/* ============================================================
   CHECKLIST
   ============================================================ */

.pdc-checklist {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 10px;
}

.pdc-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #d7e3ef;
	border-radius: 10px;
}

.pdc-check input[type="checkbox"] {
	margin-top: 2px;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.pdc-check label {
	margin: 0;
	font-weight: 600;
	line-height: 1.45;
	cursor: pointer;
}

/* ============================================================
   STATE HELPER
   ============================================================ */

.pdc-state-helper {
	margin-top: 14px;
	border: 1px solid #d7e3ef;
	background: #fff;
	border-radius: 12px;
	padding: 14px 16px;
}

.pdc-state-helper h3 {
	margin: 0 0 10px;
	color: var(--pdc-secondary);
	font-size: 0.98rem;
}

.pdc-state-helper p {
	margin: 0 0 8px;
	font-size: 0.92rem;
	line-height: 1.55;
	color: #374151;
}

.pdc-state-helper p:last-child {
	margin-bottom: 0;
}

.pdc-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	border: 1px solid transparent;
	vertical-align: middle;
}

.pdc-badge.is-available {
	background: #e9f8ef;
	border-color: #bfe9cc;
	color: #106b2f;
}

.pdc-badge.is-restricted {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #9a3412;
}

.pdc-badge.is-unavailable {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: #374151;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.pdc-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.pdc-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 12px 16px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.2;
	font-family: inherit;
	font-size: inherit;
}

.pdc-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	opacity: 0.96;
}

.pdc-btn:focus-visible {
	outline: 2px solid var(--pdc-primary);
	outline-offset: 2px;
}

.pdc-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.pdc-btn--primary {
	background: linear-gradient(135deg, var(--pdc-primary), var(--pdc-secondary));
	color: #fff;
	border-color: var(--pdc-primary);
}

.pdc-btn--secondary {
	background: #fff;
	color: var(--pdc-primary);
	border-color: var(--pdc-primary);
}

.pdc-btn--danger {
	background: var(--pdc-accent);
	color: #fff;
	border-color: var(--pdc-accent);
}

.pdc-btn--muted {
	background: #eef2f7;
	color: #334155;
	border-color: #d7e3ef;
}

/* ============================================================
   RESULTS PANEL
   ============================================================ */

.pdc-result-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.pdc-result-header h2 {
	margin: 0;
	font-size: 1.15rem;
	color: var(--pdc-secondary);
}

.pdc-status {
	font-size: 0.88rem;
	color: var(--pdc-ok);
	font-weight: 700;
	transition: color 0.2s ease;
}

.pdc-status.is-error {
	color: var(--pdc-accent);
}

.pdc-draft-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.pdc-draft-tab {
	border: 1px solid #c8d6e5;
	background: #f8fafc;
	color: #334155;
	padding: 10px 14px;
	border-radius: 10px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
}

.pdc-draft-tab.is-active {
	background: var(--pdc-primary);
	color: #fff;
	border-color: var(--pdc-primary);
}

.pdc-letter-panel {
	display: none;
}

.pdc-letter-panel.is-active {
	display: block;
}

.pdc-letter {
	background: #fff;
	border: 1px solid #dde7f0;
	border-radius: 12px;
	padding: 18px;
	min-height: 430px;
	max-height: 620px;
	overflow: auto;
	white-space: pre-wrap;
	line-height: 1.7;
	font-size: 0.96rem;
	font-family: Arial, sans-serif;
	transition: opacity 0.25s ease;
}

.pdc-letter.is-placeholder {
	color: #64748b;
}

.pdc-letter.is-loading {
	opacity: 0.3;
}

.pdc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}

.pdc-actions .pdc-btn {
	flex: 1 1 180px;
}

/* ============================================================
   MINI PANELS
   ============================================================ */

.pdc-mini-panels {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin-top: 18px;
}

.pdc-mini-panel {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 14px 16px;
	background: #f8fafc;
}

.pdc-mini-panel h3 {
	margin: 0 0 8px;
	font-size: 0.96rem;
	color: var(--pdc-secondary);
}

.pdc-mini-panel p,
.pdc-mini-panel ul {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.6;
	color: #374151;
}

.pdc-mini-panel ul {
	padding-left: 18px;
}

.pdc-mini-panel a {
	color: var(--pdc-primary);
	text-decoration: underline;
	font-weight: 600;
}

/* ============================================================
   FEEDBACK WIDGET
   ============================================================ */

.pdc-feedback {
	margin-top: 18px;
	padding: 14px 16px;
	background: #f0f7ff;
	border: 1px solid var(--pdc-border);
	border-radius: 12px;
	text-align: center;
}

.pdc-feedback p {
	margin: 0 0 10px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--pdc-secondary);
}

.pdc-feedback-buttons {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
}

.pdc-feedback-buttons button {
	background: #fff;
	border: 1px solid #c8d6e5;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.pdc-feedback-buttons button:hover {
	background: var(--pdc-primary);
	color: #fff;
	border-color: var(--pdc-primary);
}

.pdc-feedback-buttons button.is-selected {
	background: var(--pdc-ok);
	color: #fff;
	border-color: var(--pdc-ok);
}

.pdc-feedback-thanks {
	font-size: 0.9rem;
	color: var(--pdc-ok);
	font-weight: 600;
	margin-top: 8px;
}

/* ============================================================
   DISCLAIMER
   ============================================================ */

.pdc-disclaimer {
	margin-top: 18px;
	padding: 14px 16px;
	border: 1px solid #fecaca;
	background: #fff7f7;
	border-radius: 12px;
	font-size: 0.86rem;
	line-height: 1.6;
	color: #991b1b;
}

/* ============================================================
   COUNTERS + NOTES
   ============================================================ */

.pdc-char-counter {
	margin-top: 6px;
	font-size: 0.82rem;
	color: var(--pdc-muted);
	text-align: right;
}

.pdc-note {
	margin-top: 12px;
	font-size: 0.84rem;
	color: var(--pdc-muted);
	line-height: 1.55;
}

/* ============================================================
   EMBED CTA
   ============================================================ */

.pdc-embed-cta {
	margin: 36px 0;
	padding: 24px;
	background: linear-gradient(135deg, #f0f7ff, #ffffff);
	border: 1px solid var(--pdc-border);
	border-radius: 14px;
}

.pdc-embed-cta-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: center;
}

.pdc-embed-cta-content h2 {
	margin: 0 0 10px;
	font-size: 1.3rem;
	color: var(--pdc-secondary);
}

.pdc-embed-cta-content p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #374151;
}

.pdc-embed-cta-code label {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--pdc-secondary);
}

.pdc-embed-cta-code textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c8d6e5;
	border-radius: 8px;
	font-family: monospace;
	font-size: 0.82rem;
	background: #fff;
	resize: vertical;
	margin-bottom: 10px;
}

/* ============================================================
   RELATED TOOLS
   ============================================================ */

.pdc-related-tools {
	margin: 36px 0;
}

.pdc-related-tools h2 {
	margin: 0 0 18px;
	font-size: 1.4rem;
	color: var(--pdc-secondary);
}

.pdc-related-tools-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.pdc-related-tool-card {
	display: block;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--pdc-border);
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: all 0.2s ease;
}

.pdc-related-tool-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(17, 46, 81, 0.08);
	border-color: var(--pdc-primary);
}

.pdc-related-tool-card h3 {
	margin: 0 0 8px;
	font-size: 1.05rem;
	color: var(--pdc-primary);
}

.pdc-related-tool-card p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: #475569;
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */

@media (max-width: 980px) {
	.pdc-layout {
		grid-template-columns: 1fr;
	}

	.pdc-inputs {
		border-right: none;
		border-bottom: 1px solid var(--pdc-border);
	}

	.pdc-embed-cta-inner {
		grid-template-columns: 1fr;
	}

	.pdc-related-tools-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.pdc-grid,
	.pdc-step-indicator {
		grid-template-columns: 1fr;
	}

	.pdc-inputs,
	.pdc-results,
	.pdc-topbar {
		padding-left: 16px;
		padding-right: 16px;
	}

	.pdc-feedback-buttons {
		flex-direction: column;
	}

	.pdc-feedback-buttons button {
		width: 100%;
	}
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.pdc-btn,
	.pdc-letter,
	.pdc-related-tool-card,
	.pdc-feedback-buttons button {
		transition: none;
	}

	.pdc-btn:hover {
		transform: none;
	}
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
	.pdc-inputs,
	.pdc-step-indicator,
	.pdc-toolbar,
	.pdc-actions,
	.pdc-feedback,
	.pdc-embed-cta,
	.pdc-related-tools {
		display: none !important;
	}

	.pdc-layout {
		grid-template-columns: 1fr;
	}

	.pdc-letter {
		max-height: none;
		border: none;
		padding: 0;
	}
}