/**
 * CC Accesos — solo bajo .ccap-scope para no colisionar con otros plugins/temas.
 * (No usar clases genéricas tipo cc-mf-card sin este prefijo.)
 */

.ccap-scope {
	/* No aplicamos estilos globales aquí para evitar herencias en paneles de otros plugins (cc-mm-*, etc.) */
}

/* Reset de box-sizing solo para nuestros elementos y etiquetas de formulario estándar dentro del scope */
.ccap-scope, 
.ccap-scope [class^="ccap-"],
.ccap-scope [class*=" ccap-"],
.ccap-scope form,
.ccap-scope input,
.ccap-scope button,
.ccap-scope select,
.ccap-scope textarea,
.ccap-scope label,
.ccap-scope p,
.ccap-scope h1,
.ccap-scope h2,
.ccap-scope h3 {
	box-sizing: border-box;
}

/* Tipografía y colores aplicados de forma más selectiva */
.ccap-scope :where([class^="ccap-"], [class*=" ccap-"], p, h1, h2, h3, label, input, button, select, textarea) {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--ccap-text, #0f172a);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Protección explícita para elementos de otros plugins (prefijo cc- pero no ccap-) */
.ccap-scope [class^="cc-"]:not([class^="ccap-"]),
.ccap-scope [class^="cc-"]:not([class^="ccap-"]) *,
.ccap-scope [class*=" cc-"]:not([class*=" ccap-"]),
.ccap-scope [class*=" cc-"]:not([class*=" ccap-"]) * {
	box-sizing: initial;
	font-family: inherit;
	color: inherit;
	line-height: inherit;
}

.ccap-scope .ccap-card {
	background: var(--ccap-surface, #ffffff);
	color: var(--ccap-text, #0f172a);
	border-radius: var(--ccap-card-radius, 12px);
	box-shadow: var(--ccap-card-shadow, 0 4px 16px rgba(0, 0, 0, 0.08));
	padding: 28px 30px;
	margin: 1.25rem 0;
	animation: ccapFadeIn 0.45s ease both;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: 1px solid var(--ccap-border, #e2e8f0);
}

.ccap-scope .ccap-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ccap-card-shadow-hover, 0 8px 24px rgba(0, 0, 0, 0.12));
}

.ccap-scope .ccap-login-card {
	border-left-width: var(--ccap-accent-width, 4px);
	max-width: 440px;
	margin-left: auto;
	margin-right: auto;
}

.ccap-scope .ccap-accent-blue {
	border-left-color: var(--ccap-primary, #1d4ed8);
}

.ccap-scope .ccap-accent-green {
	border-left-color: var(--ccap-success, #059669);
}

.ccap-scope .ccap-accent-orange {
	border-left-color: var(--ccap-warning, #d97706);
}

.ccap-scope [class*="ccap-accent-"] {
	border-left-style: solid;
	border-left-width: var(--ccap-accent-width, 4px);
}

.ccap-scope .ccap-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 0.9rem;
	color: var(--ccap-text, #0f172a);
}

.ccap-scope .ccap-input {
	width: 100%;
	max-width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--ccap-border, #e2e8f0);
	border-radius: 10px;
	background: var(--ccap-surface, #fff);
	font-size: 1rem;
	color: var(--ccap-text, #0f172a);
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ccap-scope .ccap-input:focus {
	outline: none;
	border-color: var(--ccap-primary, #1d4ed8);
	box-shadow: 0 0 0 3px var(--ccap-primary-soft, #bfdbfe);
}

.ccap-scope .ccap-row {
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

.ccap-scope .ccap-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: var(--ccap-btn-radius, 10px);
	font-weight: 700;
	cursor: pointer;
	border: 1.5px solid transparent;
	font-size: 0.95rem;
	transition: all 0.2s ease;
	text-decoration: none;
	font-family: inherit;
	line-height: 1.2;
}

.ccap-scope .ccap-btn-primary {
	background: var(--ccap-primary, #1d4ed8);
	color: #fff;
	box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.ccap-scope .ccap-btn-primary:hover {
	background: var(--ccap-primary-hover, #1e40af);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(29, 78, 216, 0.35);
}

.ccap-scope .ccap-btn-ghost {
	background: transparent;
	color: var(--ccap-text-muted, #64748b);
	border-color: var(--ccap-border, #e2e8f0);
}

.ccap-scope .ccap-btn-ghost:hover {
	background: var(--ccap-page-bg, #f1f5f9);
	color: var(--ccap-text, #0f172a);
	border-color: var(--ccap-text-muted, #64748b);
}

.ccap-scope .ccap-msg {
	padding: 14px 18px;
	background: var(--ccap-page-bg, #f1f5f9);
	border-radius: 10px;
	border: 1px solid var(--ccap-border, #e2e8f0);
	margin-bottom: 1rem;
}

.ccap-scope .ccap-alert {
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 1.25rem;
	font-weight: 600;
	border-left-style: solid;
	border-left-width: var(--ccap-accent-width, 4px);
	border-left-color: transparent;
}

.ccap-scope .ccap-alert-success {
	color: #065f46;
	background: #d1fae5;
	border-left-color: var(--ccap-success, #059669);
}

.ccap-scope .ccap-alert-error {
	color: #991b1b;
	background: #fee2e2;
	border-left-color: var(--ccap-danger, #dc2626);
}

.ccap-scope .ccap-recaptcha {
	margin: 1.25rem 0;
}

@keyframes ccapFadeIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ccap-scope .ccap-login-logo {
	text-align: center;
	margin-bottom: 20px;
}

.ccap-scope .ccap-login-logo img {
	max-width: 180px;
	height: auto;
	display: inline-block;
}

.ccap-scope .ccap-login-welcome {
	text-align: center;
	margin-bottom: 24px;
}

.ccap-scope .ccap-login-welcome h3 {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 800;
}

.ccap-scope .ccap-login-meta {
	margin-bottom: 1.25rem;
	font-size: 0.9rem;
}

.ccap-scope .ccap-login-footer {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid var(--ccap-border, #e2e8f0);
	font-size: 0.875rem;
	color: var(--ccap-text-muted, #64748b);
	line-height: 1.5;
}

.ccap-scope .ccap-login-links {
	margin-top: 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	font-size: 0.85rem;
}

.ccap-scope .ccap-login-links a {
	color: var(--ccap-primary, #1d4ed8);
	text-decoration: none;
	font-weight: 600;
}

.ccap-scope .ccap-login-links a:hover {
	text-decoration: underline;
}

@media print {
	.ccap-scope .ccap-card {
		box-shadow: none;
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}

/* —— Mi cuenta —— */
.ccap-scope.ccap-account {
	max-width: var(--ccap-account-max-width, 960px);
	margin: 1.5rem auto 2.5rem;
	padding: 0 12px;
}

.ccap-scope .ccap-account-shell {
	padding: 0;
	/* Quitamos overflow: hidden para que no corte paneles flotantes de otros plugins (cc-mm-*) si el shortcode está en el mismo contenedor */
	overflow: visible; 
	border-left-style: solid;
	border-left-width: var(--ccap-account-accent-width, 4px);
	border-left-color: var(--ccap-account-border, #1d4ed8);
	border-radius: var(--ccap-account-radius, 12px);
	box-shadow: var(--ccap-account-shadow, 0 4px 16px rgba(0, 0, 0, 0.08));
}

.ccap-scope.ccap-account .ccap-card:hover {
	transform: none;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ccap-scope .ccap-account-hero {
	background: linear-gradient(
		135deg,
		var(--ccap-hero-start, #0f172a) 0%,
		var(--ccap-hero-mid, #1d4ed8) 55%,
		var(--ccap-hero-end, #2563eb) 100%
	);
	color: var(--ccap-hero-text, #f8fafc);
	padding: 28px 32px 32px;
	position: relative;
}

.ccap-scope .ccap-account-hero-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 16px;
}

.ccap-scope .ccap-account-hero .ccap-account-logout {
	color: inherit;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.12);
	font-weight: 700;
	font-size: 0.875rem;
	transition: background 0.15s ease;
}

.ccap-scope .ccap-account-hero .ccap-account-logout:hover {
	background: rgba(255, 255, 255, 0.22);
}

.ccap-scope .ccap-account-hero-inner {
	max-width: 640px;
}

.ccap-scope .ccap-account-kicker {
	margin: 0 0 8px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.85;
}

.ccap-scope .ccap-account-title {
	margin: 0 0 6px;
	font-size: clamp(1.5rem, 4vw, 1.85rem);
	font-weight: 800;
	line-height: 1.2;
}

.ccap-scope .ccap-account-sub {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	opacity: 0.92;
}

.ccap-scope .ccap-account-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	padding: 28px 28px 32px;
	background: var(--ccap-page-bg, #f1f5f9);
}

.ccap-scope .ccap-account-grid.ccap-no-aside {
	grid-template-columns: 1fr !important;
}

@media (min-width: 900px) {
	.ccap-scope .ccap-account-grid:not(.ccap-no-aside) {
		grid-template-columns: 260px minmax(0, 1fr);
		align-items: start;
		gap: 36px;
		padding: 32px 36px 40px;
	}
}

.ccap-scope .ccap-account-aside {
	background: var(--ccap-surface, #fff);
	border-radius: var(--ccap-account-radius, 12px);
	padding: 22px 20px;
	border: 1px solid var(--ccap-border, #e2e8f0);
	box-shadow: var(--ccap-account-shadow, 0 2px 8px rgba(0, 0, 0, 0.04));
	text-align: center;
}

@media (min-width: 900px) {
	.ccap-scope .ccap-account-aside {
		position: sticky;
		top: 24px;
	}
}

.ccap-scope .ccap-account-photo-ring {
	width: 200px;
	max-width: 100%;
	aspect-ratio: 1;
	margin: 0 auto 16px;
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid var(--ccap-border, #e2e8f0);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	background: var(--ccap-page-bg, #f1f5f9);
}

.ccap-scope .ccap-account-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ccap-scope .ccap-account-email-label {
	margin: 0 0 4px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ccap-text-muted, #64748b);
}

.ccap-scope .ccap-account-email {
	margin: 0 0 12px;
	font-size: 0.92rem;
	font-weight: 600;
	word-break: break-all;
	color: var(--ccap-text, #0f172a);
}

.ccap-scope .ccap-account-phone-badge {
	display: inline-block;
	margin: 0;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ccap-badge-phone-bg, #eff6ff);
	color: var(--ccap-primary, #1d4ed8);
	font-weight: 700;
	font-size: 0.9rem;
}

.ccap-scope .ccap-account-main {
	background: var(--ccap-surface, #fff);
	border-radius: 12px;
	padding: 24px 22px 8px;
	border: 1px solid var(--ccap-border, #e2e8f0);
}

.ccap-scope .ccap-account-section {
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--ccap-border, #e2e8f0);
}

.ccap-scope .ccap-account-section:last-of-type {
	border-bottom: none;
}

.ccap-scope .ccap-account-section-muted {
	background: var(--ccap-surface-muted, #f8fafc);
	margin: 0 -22px 1.25rem;
	padding: 18px 22px 1.25rem;
	border-radius: 8px;
	border: 1px solid var(--ccap-border, #e2e8f0);
}

.ccap-scope .ccap-account-h3 {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 800;
	color: var(--ccap-text, #0f172a);
}

.ccap-scope .ccap-account-fields .ccap-field {
	margin-bottom: 14px;
}

.ccap-scope .ccap-account-two {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 16px;
}

@media (min-width: 520px) {
	.ccap-scope .ccap-account-two {
		grid-template-columns: 1fr 1fr;
	}
}

.ccap-scope .ccap-input-wide {
	max-width: 100%;
	width: 100%;
}

.ccap-scope .ccap-textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ccap-border, #e2e8f0);
	border-radius: 8px;
	font-size: 0.95rem;
	line-height: 1.5;
	font-family: inherit;
	resize: vertical;
	min-height: 96px;
	color: var(--ccap-text, #0f172a);
	background: var(--ccap-surface, #fff);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ccap-scope .ccap-textarea:focus {
	outline: none;
	border-color: var(--ccap-primary, #1d4ed8);
	box-shadow: 0 0 0 3px var(--ccap-primary-soft, #bfdbfe);
}

.ccap-scope .ccap-account-form input[type="file"] {
	font-size: 0.9rem;
	padding: 8px 0;
}

.ccap-scope .ccap-help-inline {
	margin: 0 0 12px;
	font-size: 0.8rem;
	color: var(--ccap-text-muted, #64748b);
	line-height: 1.45;
}

.ccap-scope .ccap-account-actions {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

.ccap-scope .ccap-account-guest .ccap-btn {
	text-decoration: none;
	display: inline-block;
}

/*
 * Divi 5 / Theme Builder (#et-boc): evita que flex/grid del builder aplaste el shortcode.
 * Selectores específicos solo bajo .ccap-scope; no se tocan .cc-mm-* (menú global aparte).
 */
#et-boc .et-l .et_pb_module .ccap-scope {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

#et-boc .et-l .et_pb_row .et_pb_column .ccap-scope.ccap-account {
	flex: 1 1 100%;
	align-self: stretch;
}

#et-boc .et-l .et_pb_module .ccap-scope .ccap-account-grid {
	display: grid;
}

#et-boc .et-l .et_pb_module .ccap-scope .ccap-account-hero .ccap-account-title,
#et-boc .et-l .et_pb_module .ccap-scope .ccap-account-main .ccap-account-h3,
#et-boc .et-l .et_pb_module .ccap-scope .ccap-card {
	font-family: inherit;
}

#et-boc .et-l .et_pb_module .ccap-scope p.ccap-field {
	margin-bottom: 0;
}

/*
 * Menús/paneles .cc-mm-* (otros plugins): no añadimos reglas aquí para no pisar su z-index ni layout.
 * Si hacía falta forzar Inter en todo el sitio, desactivar: ya no se carga Google Fonts en el front
 * (filtro ccap_enqueue_google_inter_font para volver a activarlo solo en páginas con shortcodes).
 */
