/* Aficine — Canal de denuncias */

:root {
	--afi-brand: #032e51;
	--afi-brand-hover: #065a99;
	--afi-brand-light: rgba(3, 46, 81, 0.12);
	--afi-brand-focus: rgba(3, 46, 81, 0.2);
	--afi-dark: #141414;
	--afi-dark-hover: #2a2a2a;
	--afi-error: #c8102e;
	--afi-radius-sm: 8px;
	--afi-radius-md: 12px;
	--afi-radius-pill: 32px;
}

.afi-forms-wrap {
	margin: 1rem 0;
}

.afi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.55rem 1.15rem;
	border: none;
	border-radius: var(--afi-radius-sm);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.afi-btn[hidden],
.afi-btn.afi-is-hidden {
	display: none !important;
}

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

/* CTAs — plano #141414 */
.afi-btn-brand,
.afi-btn-primary,
.afi-btn-primary.afi-btn-submit,
.afi-btn-next,
.afi-open-modal {
	background: var(--afi-dark);
	color: #fff;
}

.afi-btn-brand:hover,
.afi-btn-brand:focus,
.afi-btn-primary:hover,
.afi-btn-primary:focus,
.afi-btn-primary.afi-btn-submit:hover,
.afi-btn-primary.afi-btn-submit:focus,
.afi-btn-next:hover,
.afi-btn-next:focus,
.afi-open-modal:hover,
.afi-open-modal:focus {
	background: var(--afi-dark-hover);
	color: #fff;
}

/* Botón shortcode: Presentar una denuncia */
.afi-open-modal {
	border-radius: 50px;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* Anterior: outline marca */
.afi-btn-secondary.afi-btn-nav {
	background: #fff;
	color: var(--afi-brand);
	border: 1.5px solid var(--afi-brand);
	border-radius: var(--afi-radius-sm);
}

.afi-btn-secondary.afi-btn-nav:hover,
.afi-btn-secondary.afi-btn-nav:focus {
	background: var(--afi-brand-light);
	color: var(--afi-brand-hover);
	border-color: var(--afi-brand-hover);
}

.afi-btn-secondary.afi-btn-nav .dashicons {
	color: var(--afi-brand);
}

.afi-btn-secondary.afi-btn-nav:hover .dashicons,
.afi-btn-secondary.afi-btn-nav:focus .dashicons {
	color: var(--afi-brand-hover);
}

/* Above theme #sidr-main — must live on document.body */
.afi-modal {
	position: fixed;
	inset: 0;
	z-index: 10000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.admin-bar .afi-modal {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .afi-modal {
		top: 46px;
	}
}

.afi-modal[hidden] {
	display: none !important;
}

html.afi-modal-open {
	overflow: hidden;
}

.afi-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, 0.65);
}

.afi-modal-dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 600px;
	max-height: 100dvh;
	margin: 0;
	background: #fff;
	border-radius: var(--afi-radius-md);
	box-shadow: 0 16px 48px rgba(3, 46, 81, 0.18);
	overflow: hidden;
}

.afi-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #e8e8e8;
	flex-shrink: 0;
}

.afi-modal-title,
.afi-modal-header h2 {
	margin: 0 !important;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--afi-brand);
}

.afi-modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	min-width: 40px;
	min-height: 40px;
	margin: -0.25rem -0.35rem -0.25rem 0;
	padding: 0;
	cursor: pointer;
	color: var(--afi-brand);
}

.afi-modal-close:hover,
.afi-modal-close:focus {
	color: var(--afi-brand-hover);
}

.afi-progress {
	padding: 0.875rem 1.5rem 0;
	flex-shrink: 0;
}

.afi-progress-text {
	display: block;
	font-size: 0.8125rem;
	color: #666;
	margin-bottom: 0.4rem;
}

.afi-progress-bar {
	height: 4px;
	background: var(--afi-brand-light);
	border-radius: 4px;
	overflow: hidden;
}

.afi-progress-fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--afi-brand);
	transition: width 0.25s ease;
}

.afi-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 1.25rem 1.5rem 1rem;
	-webkit-overflow-scrolling: touch;
}

.afi-step {
	margin: 0;
}

.afi-step-title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--afi-brand);
}

.afi-step--radio-only .afi-step-title {
	display: none;
}

.afi-step-intro,
.afi-field-description {
	font-size: 0.875rem;
	color: #555;
	margin: 0 0 0.875rem;
	line-height: 1.55;
}

.afi-field {
	margin-bottom: 0.875rem;
}

.afi-field:last-child {
	margin-bottom: 0;
}

.afi-field-radio {
	margin-bottom: 0;
	border: 0;
	padding: 0;
	min-width: 0;
}

.afi-label,
.afi-field-radio legend.afi-label {
	display: block;
	font-weight: 600;
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: #222;
	padding: 0;
}

.afi-required {
	color: var(--afi-brand);
	font-weight: 700;
}

.afi-input,
.afi-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6rem 0.75rem;
	border: 1px solid #d0d0d0;
	border-radius: var(--afi-radius-sm);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.afi-input:focus,
.afi-field textarea:focus {
	border-color: var(--afi-brand);
	outline: none;
	box-shadow: 0 0 0 2px var(--afi-brand-focus);
}

.afi-radio-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
}

.afi-radio-option {
	display: block;
	position: relative;
	margin: 0;
	cursor: pointer;
}

.afi-radio-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.afi-radio-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 48px;
	padding: 0.65rem 1rem;
	border: 1.5px solid #d8d8d8;
	border-radius: var(--afi-radius-md);
	background: #fafafa;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.afi-radio-option:hover .afi-radio-card {
	border-color: var(--afi-brand);
	background: var(--afi-brand-light);
}

.afi-radio-option input[type="radio"]:focus-visible + .afi-radio-card {
	box-shadow: 0 0 0 2px var(--afi-brand-focus);
	border-color: var(--afi-brand);
}

.afi-radio-option input[type="radio"]:checked + .afi-radio-card {
	border-color: var(--afi-brand);
	background: var(--afi-brand-light);
}

.afi-radio-indicator {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 2px solid #bbb;
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.afi-radio-option input[type="radio"]:checked + .afi-radio-card .afi-radio-indicator {
	border-color: var(--afi-brand);
	box-shadow: inset 0 0 0 4px var(--afi-brand);
}

.afi-radio-text {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #222;
	line-height: 1.3;
}

.afi-checkbox-option {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	min-height: 44px;
	padding: 0.4rem 0;
	cursor: pointer;
}

.afi-checkbox-option input {
	margin-top: 0.15rem;
	flex-shrink: 0;
	width: 1.1rem;
	height: 1.1rem;
	accent-color: var(--afi-brand);
}

.afi-checkbox-option span {
	font-size: 0.875rem;
	line-height: 1.5;
	color: #333;
}

.afi-has-error .afi-input,
.afi-has-error textarea {
	border-color: var(--afi-error);
}

.afi-has-error .afi-radio-group {
	padding: 0.5rem;
	border-radius: var(--afi-radius-sm);
	outline: 1px solid var(--afi-error);
}

.afi-file-button {
	display: block;
	margin-top: 0.25rem;
}

.afi-file-button .afi-btn-secondary {
	background: #fff;
	color: var(--afi-brand);
	border: 1.5px solid var(--afi-brand);
	border-radius: var(--afi-radius-pill);
}

.afi-file-button .afi-btn-secondary:hover,
.afi-file-button .afi-btn-secondary:focus {
	background: var(--afi-brand-light);
	color: var(--afi-brand-hover);
}

.afi-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.afi-file-list {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: #555;
}

.afi-terminal {
	padding: 0.25rem 0;
}

.afi-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.5rem 0.5rem 0.5rem;
}

.afi-success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 0 0 1rem;
	border-radius: 50%;
	background: var(--afi-brand-light);
	color: var(--afi-brand);
}

.afi-success-icon .dashicons {
	width: 48px;
	height: 48px;
	font-size: 48px;
	line-height: 1;
}

.afi-terminal-title,
.afi-success-title {
	margin: 0 0 0.75rem;
	font-size: 1.0625rem;
	color: var(--afi-brand);
}

.afi-terminal-message,
.afi-success-message {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #444;
}

.afi-terminal-message a {
	color: var(--afi-brand);
	font-weight: 600;
	text-decoration: underline;
}

.afi-terminal-message a:hover,
.afi-terminal-message a:focus {
	color: var(--afi-brand-hover);
}

.afi-modal-footer {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.5rem;
	justify-content: center;
	align-items: center;
	padding: 0.875rem 1.5rem 1rem;
	border-top: 1px solid #e8e8e8;
	flex-shrink: 0;
}

.afi-btn-nav {
	width: 44px;
	min-width: 44px;
	height: 44px;
	padding: 0;
	flex-shrink: 0;
	border-radius: var(--afi-radius-sm);
}

.afi-btn-nav .dashicons {
	display: block;
	width: 22px;
	height: 22px;
	font-size: 22px;
	line-height: 1;
}

.afi-btn-primary.afi-btn-nav .dashicons {
	color: #fff;
}

.afi-modal-footer .afi-btn-submit {
	min-height: 44px;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	border-radius: var(--afi-radius-pill);
	flex-shrink: 0;
}

.afi-modal.afi-modal--terminal-view .afi-progress,
.afi-modal.afi-modal--success-view .afi-progress {
	display: none !important;
}

.afi-modal.afi-modal--success-view .afi-modal-footer {
	display: none !important;
}

.afi-step-hidden {
	display: none !important;
}

@media (max-width: 639px) {
	.afi-modal {
		padding: 0;
		align-items: stretch;
	}

	.afi-modal-dialog {
		max-width: none;
		max-height: 100dvh;
		height: 100dvh;
		border-radius: 0;
	}

	.afi-modal-header,
	.afi-progress,
	.afi-modal-body,
	.afi-modal-footer {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.afi-modal-footer {
		padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	}
}

@media (min-width: 640px) {
	.afi-modal {
		padding: 1rem;
	}

	.afi-modal-dialog {
		max-height: 90vh;
		border-radius: var(--afi-radius-md);
	}
}
