/* Chagua Contact 2.0 — layouts, Contact Form 7 styling, profile button, corrections policy */

:root {
	--cc-accent: #0f766e;
	--cc-ink: #0f172a;
	--cc-muted: #475569;
	--cc-line: #e2e8f0;
	--cc-field: #f8fafc;
	--cc-card: #ffffff;
	--cc-error: #b91c1c;
	--cc-ok: #15803d;
	--cc-radius: 12px;
}

/* ---------- Two-column layout (shortcode) ---------- */

.cc-wrap {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 0;
	max-width: 1100px;
	margin: 32px auto;
	background: var(--cc-card);
	border: 1px solid var(--cc-line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
	font-size: 16px;
	line-height: 1.55;
	color: var(--cc-ink);
}

.cc-info {
	position: relative;
	padding: 40px 36px;
	background: var(--cc-accent);
	background-image: linear-gradient(160deg, rgba(255,255,255,.10), rgba(0,0,0,.18));
	color: #fff;
}

.cc-wrap .cc-heading {
	margin: 0 0 12px;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	color: #fff;
	text-transform: none;
	letter-spacing: -.01em;
}

.cc-intro {
	margin: 0 0 28px;
	color: rgba(255,255,255,.88);
}

.cc-wrap .cc-sub {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255,255,255,.72);
}

.cc-topics {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.cc-topics li {
	position: relative;
	padding: 6px 0 6px 26px;
	color: #fff;
}

.cc-topics li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 12px;
	width: 12px;
	height: 7px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg);
	opacity: .9;
}

.cc-details {
	list-style: none;
	margin: 0;
	padding: 20px 0 0;
	border-top: 1px solid rgba(255,255,255,.22);
}

.cc-details li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 0;
	color: #fff;
	word-break: break-word;
}

.cc-details a {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(255,255,255,.5);
}

.cc-details a:hover { text-decoration-color: #fff; }

.cc-icon {
	flex: 0 0 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255,255,255,.16);
}

.cc-tagline {
	margin: 32px 0 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255,255,255,.65);
}

.cc-form {
	padding: 40px 40px 32px;
}

.cc-notice {
	padding: 12px 14px;
	border: 1px dashed var(--cc-error);
	border-radius: 8px;
	color: var(--cc-error);
}

@media (max-width: 860px) {
	.cc-wrap {
		grid-template-columns: 1fr;
		margin: 16px auto;
		border-radius: 12px;
	}
	.cc-info { padding: 28px 22px; }
	.cc-form { padding: 28px 22px 24px; }
	.cc-wrap .cc-heading { font-size: 24px; }
}

/* ---------- Contact Form 7 fields ---------- */
/* Applies inside the shortcode, and site-wide when "Style all CF7 forms" is on. */

.cc-wrap .wpcf7 form > p,
.cc-style-all .wpcf7 form > p {
	margin: 0 0 18px;
	color: var(--cc-muted);
}

.cc-wrap .wpcf7 label,
.cc-style-all .wpcf7 label {
	display: block;
	width: 100%;
	font-size: 14px;
	font-weight: 600;
	color: var(--cc-ink);
}

.cc-wrap .wpcf7-form-control-wrap,
.cc-style-all .wpcf7-form-control-wrap {
	display: block;
	margin-top: 6px;
}

.cc-wrap .wpcf7 input[type="text"],
.cc-wrap .wpcf7 input[type="email"],
.cc-wrap .wpcf7 input[type="tel"],
.cc-wrap .wpcf7 input[type="url"],
.cc-wrap .wpcf7 select,
.cc-wrap .wpcf7 textarea,
.cc-style-all .wpcf7 input[type="text"],
.cc-style-all .wpcf7 input[type="email"],
.cc-style-all .wpcf7 input[type="tel"],
.cc-style-all .wpcf7 input[type="url"],
.cc-style-all .wpcf7 select,
.cc-style-all .wpcf7 textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	height: auto;
	min-height: 48px;
	padding: 12px 14px;
	font: inherit;
	font-size: 16px; /* stops iOS zoom on focus */
	font-weight: 400;
	color: var(--cc-ink);
	background: var(--cc-field);
	border: 1px solid var(--cc-line);
	border-radius: 10px;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
	-webkit-appearance: none;
	appearance: none;
}

.cc-wrap .wpcf7 textarea,
.cc-style-all .wpcf7 textarea {
	min-height: 150px;
	resize: vertical;
}

.cc-wrap .wpcf7 select,
.cc-style-all .wpcf7 select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.cc-wrap .wpcf7 ::placeholder,
.cc-style-all .wpcf7 ::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.cc-wrap .wpcf7 input:focus,
.cc-wrap .wpcf7 select:focus,
.cc-wrap .wpcf7 textarea:focus,
.cc-style-all .wpcf7 input:focus,
.cc-style-all .wpcf7 select:focus,
.cc-style-all .wpcf7 textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--cc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-accent) 22%, transparent);
}

/* Name + email side by side on wide screens: wrap them in <div class="cc-row">…</div> in the form editor */
.cc-wrap .wpcf7 .cc-row,
.cc-style-all .wpcf7 .cc-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

@media (max-width: 600px) {
	.cc-wrap .wpcf7 .cc-row,
	.cc-style-all .wpcf7 .cc-row { grid-template-columns: 1fr; }
}

/* Acceptance / checkbox */
.cc-wrap .wpcf7-acceptance .wpcf7-list-item,
.cc-style-all .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

.cc-wrap .wpcf7-acceptance label,
.cc-style-all .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	font-size: 14px;
	color: var(--cc-muted);
	cursor: pointer;
}

.cc-wrap .wpcf7 input[type="checkbox"],
.cc-style-all .wpcf7 input[type="checkbox"] {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--cc-accent);
}

.cc-wrap .wpcf7 a,
.cc-style-all .wpcf7 a {
	color: var(--cc-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Submit */
.cc-wrap .wpcf7 input[type="submit"],
.cc-wrap .wpcf7 .wpcf7-submit,
.cc-style-all .wpcf7 input[type="submit"],
.cc-style-all .wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 180px;
	height: 50px;
	padding: 0 28px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: var(--cc-accent);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: filter .15s, transform .05s;
	text-transform: none;
	letter-spacing: 0;
}

.cc-wrap .wpcf7 .wpcf7-submit:hover,
.cc-style-all .wpcf7 .wpcf7-submit:hover { filter: brightness(1.08); }

.cc-wrap .wpcf7 .wpcf7-submit:active,
.cc-style-all .wpcf7 .wpcf7-submit:active { transform: translateY(1px); }

.cc-wrap .wpcf7 .wpcf7-submit:focus-visible,
.cc-style-all .wpcf7 .wpcf7-submit:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--cc-accent) 40%, transparent);
	outline-offset: 2px;
}

.cc-wrap .wpcf7 .wpcf7-submit:disabled,
.cc-style-all .wpcf7 .wpcf7-submit:disabled {
	opacity: .5;
	cursor: not-allowed;
}

@media (max-width: 600px) {
	.cc-wrap .wpcf7 input[type="submit"].wpcf7-submit,
	.cc-style-all .wpcf7 input[type="submit"].wpcf7-submit { width: 100%; }
}

/* Spinner sits next to the button */
.cc-wrap .wpcf7 .wpcf7-spinner,
.cc-style-all .wpcf7 .wpcf7-spinner { vertical-align: middle; margin-left: 12px; }

/* Validation */
.cc-wrap .wpcf7 .wpcf7-not-valid,
.cc-style-all .wpcf7 .wpcf7-not-valid {
	border-color: var(--cc-error) !important;
	background: #fef2f2 !important;
}

.cc-wrap .wpcf7-not-valid-tip,
.cc-style-all .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--cc-error);
}

/* Response box */
.cc-wrap .wpcf7 form .wpcf7-response-output,
.cc-style-all .wpcf7 form .wpcf7-response-output {
	margin: 20px 0 0;
	padding: 12px 16px;
	font-size: 14px;
	border: 0;
	border-left: 4px solid var(--cc-accent);
	border-radius: 8px;
	background: var(--cc-field);
	color: var(--cc-ink);
}

.cc-wrap .wpcf7 form.sent .wpcf7-response-output,
.cc-style-all .wpcf7 form.sent .wpcf7-response-output {
	border-left-color: var(--cc-ok);
	background: #f0fdf4;
}

.cc-wrap .wpcf7 form.invalid .wpcf7-response-output,
.cc-wrap .wpcf7 form.unaccepted .wpcf7-response-output,
.cc-wrap .wpcf7 form.failed .wpcf7-response-output,
.cc-wrap .wpcf7 form.spam .wpcf7-response-output,
.cc-style-all .wpcf7 form.invalid .wpcf7-response-output,
.cc-style-all .wpcf7 form.unaccepted .wpcf7-response-output,
.cc-style-all .wpcf7 form.failed .wpcf7-response-output,
.cc-style-all .wpcf7 form.spam .wpcf7-response-output {
	border-left-color: var(--cc-error);
	background: #fef2f2;
}

/* ---------- Report a Correction extras ---------- */

.cc-steps {
	list-style: none;
	counter-reset: cc-step;
	margin: 0 0 28px;
	padding: 0;
}

.cc-steps li {
	counter-increment: cc-step;
	position: relative;
	padding: 5px 0 12px 42px;
	color: #fff;
}

.cc-steps li::before {
	content: counter(cc-step);
	position: absolute;
	left: 0;
	top: 2px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--cc-accent);
	font-size: 14px;
	font-weight: 700;
}

.cc-note {
	margin: 24px 0 0;
	padding: 14px 16px;
	font-size: 14px;
	border-radius: 10px;
	background: rgba(0, 0, 0, .18);
	color: rgba(255, 255, 255, .92);
}

/* Small helper text under a field: <span class="cc-help">…</span> */
.cc-wrap .wpcf7 .cc-help,
.cc-style-all .wpcf7 .cc-help {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 400;
	color: var(--cc-muted);
}

/* Section divider inside a form: <h4 class="cc-section">…</h4> */
.cc-wrap .wpcf7 .cc-section,
.cc-style-all .wpcf7 .cc-section {
	margin: 28px 0 14px;
	padding-top: 20px;
	border-top: 1px solid var(--cc-line);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cc-muted);
}

.cc-wrap .wpcf7 form > .cc-section:first-child,
.cc-style-all .wpcf7 form > .cc-section:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* File upload */
.cc-wrap .wpcf7 input[type="file"],
.cc-style-all .wpcf7 input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	padding: 14px;
	font-size: 14px;
	color: var(--cc-muted);
	background: var(--cc-field);
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	cursor: pointer;
}

.cc-wrap .wpcf7 input[type="file"]::file-selector-button,
.cc-style-all .wpcf7 input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 8px 14px;
	font: inherit;
	font-weight: 600;
	color: var(--cc-accent);
	background: #fff;
	border: 1px solid var(--cc-line);
	border-radius: 8px;
	cursor: pointer;
}

/* Shorter textarea: add class:cc-short to the CF7 tag */
.cc-wrap .wpcf7 textarea.cc-short,
.cc-style-all .wpcf7 textarea.cc-short { min-height: 96px; }

/* ---------- "Report a correction" button ---------- */

.cc-report-btn,
.cc-fab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	border-radius: 999px;
	transition: filter .15s, box-shadow .15s, transform .05s;
}

.cc-report-btn {
	padding: 10px 16px;
	color: var(--cc-accent) !important;
	background: #fff;
	border: 1px solid var(--cc-line);
}

.cc-report-btn:hover {
	border-color: var(--cc-accent);
}

.cc-fab {
	position: fixed;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	padding: 12px 18px;
	color: #fff !important;
	background: var(--cc-accent);
	box-shadow: 0 8px 24px -6px rgba(15, 23, 42, .35);
}

.cc-fab-right { right: 20px; }
.cc-fab-left  { left: 20px; }

.cc-fab:hover { filter: brightness(1.08); }
.cc-fab:active,
.cc-report-btn:active { transform: translateY(1px); }

.cc-fab:focus-visible,
.cc-report-btn:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--cc-accent) 40%, transparent);
	outline-offset: 2px;
}

/* On phones: icon-only circle so it never covers content */
@media (max-width: 600px) {
	.cc-fab {
		width: 48px;
		height: 48px;
		padding: 0;
		justify-content: center;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}
	.cc-fab-right { right: 16px; }
	.cc-fab-left  { left: 16px; }
	.cc-fab span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	.cc-fab svg { width: 20px; height: 20px; }
}

@media print {
	.cc-fab { display: none; }
}

/* "Correction for …" banner at the top of the corrections form */
.cc-profile {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 24px;
	padding: 12px 14px;
	background: var(--cc-field);
	border: 1px solid var(--cc-line);
	border-left: 4px solid var(--cc-accent);
	border-radius: 10px;
}

.cc-profile img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 44px;
}

.cc-profile-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cc-muted);
}

.cc-profile a {
	font-size: 16px;
	font-weight: 700;
	color: var(--cc-ink) !important;
	text-decoration: none;
}

.cc-profile a:hover { text-decoration: underline; }

/* Note box can hold a paragraph + policy link */
.cc-note p { margin: 0; }
.cc-note a {
	display: inline-block;
	margin-top: 8px;
	font-weight: 600;
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Hidden CF7 fields never take space */
.cc-wrap .wpcf7 input[type="hidden"] + br { display: none; }

/* ---------- Corrections Policy page ---------- */

.cc-policy {
	max-width: 760px;
	margin: 0 auto;
	font-size: 17px;
	line-height: 1.65;
	color: var(--cc-ink);
}

.cc-policy-lead {
	margin: 0 0 32px;
	font-size: 19px;
	line-height: 1.55;
	color: var(--cc-muted);
}

.cc-policy-section {
	padding: 24px 0;
	border-top: 1px solid var(--cc-line);
}

.cc-policy h2 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--cc-ink);
	text-transform: none;
	letter-spacing: -.01em;
}

.cc-policy-num {
	flex: 0 0 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 14px;
	color: #fff;
	background: var(--cc-accent);
}

.cc-policy p { margin: 0 0 12px; }

.cc-policy ul {
	margin: 0 0 12px;
	padding-left: 22px;
}

.cc-policy ul li { margin: 4px 0; }
.cc-policy ul li::marker { color: var(--cc-accent); }

.cc-policy-sources {
	list-style: none;
	counter-reset: cc-src;
	margin: 8px 0 16px;
	padding: 0;
}

.cc-policy-sources li {
	counter-increment: cc-src;
	display: flex;
	gap: 12px;
	align-items: baseline;
	padding: 10px 14px;
	margin: 0 0 6px;
	background: var(--cc-field);
	border: 1px solid var(--cc-line);
	border-radius: 10px;
}

.cc-policy-sources li::before {
	content: counter(cc-src);
	font-weight: 700;
	color: var(--cc-accent);
	min-width: 14px;
}

.cc-policy a { color: var(--cc-accent); text-underline-offset: 2px; }

.cc-policy-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 16px 0 12px;
	padding: 24px 28px;
	border-radius: 16px;
	color: #fff;
	background: var(--cc-accent);
	background-image: linear-gradient(160deg, rgba(255,255,255,.10), rgba(0,0,0,.18));
}

.cc-policy-cta h2 { margin: 0 0 4px; color: #fff; font-size: 20px; }
.cc-policy-cta p { margin: 0; color: rgba(255,255,255,.9); font-size: 15px; }
.cc-policy-cta p a { color: #fff; }

.cc-policy .cc-policy-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	height: 48px;
	padding: 0 22px;
	font-size: 15px;
	font-weight: 700;
	color: var(--cc-accent);
	background: #fff;
	border-radius: 10px;
	text-decoration: none;
}

.cc-policy .cc-policy-btn:hover { filter: brightness(.96); }

.cc-policy-updated {
	font-size: 13px;
	color: var(--cc-muted);
}

@media (max-width: 600px) {
	.cc-policy { font-size: 16px; }
	.cc-policy-lead { font-size: 17px; }
	.cc-policy h2 { font-size: 19px; }
	.cc-policy-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
	.cc-policy .cc-policy-btn { width: 100%; justify-content: center; }
}
