/* Creativia Geo Content — estilos del pop-up frontend */

#cgc-popup-root {
	--cgc-accent: #2563eb;
}

/* Bloqueo de scroll mientras el pop-up obligatorio está abierto */
html.cgc-lock,
html.cgc-lock body {
	overflow: hidden !important;
	height: 100%;
}

.cgc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 16px;
	animation: cgc-fade 0.2s ease;
}

@keyframes cgc-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.cgc-modal {
	position: relative;
	background: #fff;
	color: #0f172a;
	width: 100%;
	max-width: 420px;
	border-radius: 16px;
	padding: 28px 26px 26px;
	box-shadow: 0 20px 60px rgba(2, 6, 23, 0.35);
	animation: cgc-pop 0.22s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@keyframes cgc-pop {
	from { transform: translateY(12px) scale(0.98); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

.cgc-title {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
}

.cgc-detected,
.cgc-choose-label {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.5;
	color: #334155;
}

.cgc-actions-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.cgc-btn {
	flex: 1 1 auto;
	border: none;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.05s ease, background 0.15s ease;
}
.cgc-btn:active { transform: scale(0.98); }

.cgc-btn-primary {
	background: var(--cgc-accent);
	color: #fff;
}
.cgc-btn-primary:hover { filter: brightness(0.94); }

.cgc-btn-secondary {
	background: #f1f5f9;
	color: #334155;
}
.cgc-btn-secondary:hover { background: #e2e8f0; }

.cgc-flags {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	max-height: 320px;
	overflow-y: auto;
}

.cgc-flag-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #e2e8f0;
	background: #fff;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	font-size: 15px;
	text-align: left;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.cgc-flag-btn:hover {
	border-color: var(--cgc-accent);
	background: #f8fafc;
}

.cgc-flag-emoji { font-size: 24px; line-height: 1; }
.cgc-flag-name { font-weight: 600; color: #1e293b; }

.cgc-note {
	color: #64748b;
	font-size: 14px;
	grid-column: 1 / -1;
	text-align: center;
}

/* Botón "Otro país" */
.cgc-otro-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin-top: 10px;
	border: 1px dashed #cbd5e1;
	background: #fff;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	font-size: 15px;
	text-align: left;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.cgc-otro-btn:hover {
	border-color: var(--cgc-accent);
	background: #f8fafc;
}

/* Aviso de selección obligatoria */
.cgc-required {
	margin: 14px 0 0;
	font-size: 12.5px;
	color: #64748b;
	text-align: center;
}

/* Selector con búsqueda */
.cgc-search-wrap { margin-top: 6px; }

.cgc-search-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 11px 14px;
	font-size: 15px;
	outline: none;
	margin-bottom: 10px;
}
.cgc-search-input:focus {
	border-color: var(--cgc-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cgc-search-list {
	max-height: 260px;
	overflow-y: auto;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

.cgc-search-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	border: none;
	border-bottom: 1px solid #f1f5f9;
	background: #fff;
	padding: 10px 14px;
	cursor: pointer;
	font-size: 15px;
	text-align: left;
	color: #1e293b;
}
.cgc-search-opt:last-child { border-bottom: none; }
.cgc-search-opt:hover { background: #f1f5f9; }

.cgc-search-empty {
	padding: 16px;
	text-align: center;
	color: #94a3b8;
	font-size: 14px;
}

@media (max-width: 420px) {
	.cgc-flags { grid-template-columns: 1fr; }
}
