/**
 * Estilos públicos para Descargas y Registro (Modal, Botón y Formularios)
 * @package DescargasRegistro
 */

/* 1. Botón Disparador */
.dr-shortcode-container {
	display: inline-block;
	margin: 10px 0;
	font-family: inherit;
}

.dr-btn-open-modal {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #ffffff !important;
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.dr-btn-open-modal:hover {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
	color: #ffffff !important;
}

.dr-btn-open-modal:active {
	transform: translateY(0);
}

.dr-btn-open-modal .dr-icon {
	flex-shrink: 0;
}

/* 2. Modal Overlay & Dialog */
.dr-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.25s, opacity 0.25s ease-in-out;
}

.dr-modal.dr-modal-active {
	visibility: visible;
	opacity: 1;
}

.dr-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	cursor: pointer;
}

.dr-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: scale(0.94) translateY(15px);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
}

.dr-modal.dr-modal-active .dr-modal-dialog {
	transform: scale(1) translateY(0);
}

.dr-modal-content {
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	overflow-y: auto;
}

/* 3. Encabezado del Modal */
.dr-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 24px 28px 18px;
	border-bottom: 1px solid #f1f5f9;
	background: #ffffff;
	position: sticky;
	top: 0;
	z-index: 5;
}

.dr-header-info {
	padding-right: 15px;
}

.dr-badge-header {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #2563eb;
	background: #eff6ff;
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 6px;
}

.dr-modal-title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.dr-modal-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	transition: color 0.15s, background-color 0.15s;
}

.dr-modal-close:hover {
	color: #0f172a;
	background-color: #f1f5f9;
}

/* 4. Cuerpo y Formulario */
.dr-modal-body {
	padding: 24px 28px 28px;
	color: #334155;
	font-size: 14px;
	line-height: 1.5;
}

.dr-campaign-desc {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 18px;
	font-size: 13.5px;
	color: #475569;
}

.dr-campaign-desc p:last-child {
	margin-bottom: 0;
}

.dr-form-intro {
	margin-top: 0;
	margin-bottom: 20px;
	color: #64748b;
	font-size: 14px;
}

/* Alertas */
.dr-alert {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 13.5px;
	line-height: 1.45;
	display: none;
}

.dr-alert-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.dr-alert-success {
	background-color: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.dr-alert-info {
	background-color: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

/* Formulario */
.dr-registration-form .dr-form-group {
	margin-bottom: 16px;
}

.dr-registration-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 6px;
}

.dr-required {
	color: #ef4444;
}

.dr-input,
.dr-select {
	width: 100%;
	height: 42px;
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	color: #0f172a;
	background-color: #ffffff;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.dr-input:focus,
.dr-select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.dr-input.dr-input-error,
.dr-select.dr-input-error {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.dr-field-error {
	display: block;
	color: #ef4444;
	font-size: 12px;
	margin-top: 4px;
	min-height: 16px;
}

.dr-form-row {
	display: flex;
	gap: 12px;
}

.dr-col-4 {
	flex: 0 0 36%;
}

.dr-col-8 {
	flex: 1;
}

.dr-form-actions {
	margin-top: 24px;
}

.dr-btn-submit {
	width: 100%;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #2563eb;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.dr-btn-submit:hover:not(:disabled) {
	background: #1d4ed8;
}

.dr-btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Spinner animado */
.dr-btn-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: dr-spin 0.8s linear infinite;
	margin-left: 8px;
}

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

.dr-form-disclaimer {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	margin-bottom: 0;
	font-size: 11.5px;
	color: #94a3b8;
	text-align: center;
	justify-content: center;
}

.dr-form-disclaimer svg {
	flex-shrink: 0;
	color: #94a3b8;
}

/* 5. Modal de Éxito / Confirmación */
.dr-modal-success-dialog {
	max-width: 440px;
	border-radius: 18px;
	overflow: hidden;
}

.dr-modal-success-content {
	padding: 34px 28px 28px;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.dr-modal-success .dr-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
}

.dr-success-icon-wrap {
	margin-bottom: 18px;
}

.dr-success-icon-circle {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background-color: #dcfce7;
	color: #16a34a;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 8px rgba(220, 252, 231, 0.45);
	animation: dr-pop-scale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dr-pop-scale {
	0% {
		transform: scale(0.5);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.dr-success-title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.dr-success-message {
	margin: 0 0 24px;
	font-size: 14.5px;
	color: #475569;
	line-height: 1.55;
}

.dr-btn-success-close {
	background: #2563eb;
	color: #ffffff !important;
	border: none;
	border-radius: 8px;
	padding: 10px 32px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, transform 0.1s;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.dr-btn-success-close:hover {
	background: #1d4ed8;
	transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 576px) {
	.dr-modal {
		padding: 12px;
	}
	.dr-modal-header {
		padding: 18px 20px 14px;
	}
	.dr-modal-body {
		padding: 18px 20px 22px;
	}
	.dr-form-row {
		flex-direction: column;
		gap: 0;
	}
	.dr-col-4 {
		flex: auto;
	}
}
