/* ==========================================
   WC Geo Product Restrictions - Frontend CSS
   ========================================== */

/* CSS Variables for easy customization */
:root {
	--wcgeo-primary: #333333;
	--wcgeo-primary-hover: #000000;
	--wcgeo-primary-light: #f3f4f6;

	/* Cambios para modo claro */
	--wcgeo-text: #1f2937;          /* texto oscuro */
	--wcgeo-text-muted: #6b7280;    /* gris medio */
	--wcgeo-border: #d1d5db;        /* gris claro */
	--wcgeo-border-focus: #60a5fa;
	--wcgeo-bg: #ffffff;            /* fondo del modal blanco */

	--wcgeo-error-bg: #fee2e2;
	--wcgeo-error-border: #ef4444;
	--wcgeo-error-text: #991b1b;

	--wcgeo-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	--wcgeo-shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.1);

	--wcgeo-radius: 4px;
	--wcgeo-radius-sm: 4px;
	--wcgeo-transition: 0.2s ease;
}

/* Prevent body scroll when modal open */
html.wcgeo-modal-open,
body.wcgeo-modal-open {
	overflow: hidden !important;
}

/* ==========================================
   Modal Styles
   ========================================== */
.wcgeo-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--wcgeo-transition), visibility var(--wcgeo-transition);
}

.wcgeo-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.wcgeo-modal__backdrop {
	position: absolute;
	inset: 0;

	/* MÁS transparente */
	background: rgba(255, 255, 255, 0.6);

	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.wcgeo-modal__dialog {
	position: relative;
	width: 90%;
	max-width: 480px;
	margin: 20px;

	/* FONDO BLANCO */
	background: #ffffff;

	border-radius: var(--wcgeo-radius);
	padding: 32px;
	box-shadow: var(--wcgeo-shadow);
	transform: translateY(20px) scale(0.95);
	transition: transform var(--wcgeo-transition);
}

.wcgeo-modal.is-open .wcgeo-modal__dialog {
	transform: translateY(0) scale(1);
}

/* Location Icon Header */
.wcgeo-modal__dialog::before {
	content: "";
	display: block;
	width: 56px;
	height: 56px;
	margin: 0 auto 20px;
	background: #f3f4f6;
	border-radius: 50%;

	/* ICONO OSCURO */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231f2937'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");

	background-repeat: no-repeat;
	background-position: center;
	background-size: 28px;
}

.wcgeo-modal__title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;

	/* TEXTO OSCURO */
	color: #1f2937;
	text-align: center;
}

.wcgeo-modal__hint {
	margin: 0 0 24px;
	color: #6b7280;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

/* ==========================================
   Form Fields
   ========================================== */
.wcgeo-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
}

.wcgeo-field label {
	font-weight: 600;
	font-size: 14px;

	/* TEXTO NEGRO */
	color: black;
}

.wcgeo-select {
	width: 100%;
	padding: 14px 16px;

	/* Nuevo estilo modo claro */
	border: 2px solid #d1d5db;
	border-radius: var(--wcgeo-radius-sm);
	font-size: 15px;
	color: #1f2937;
	background-color: #ffffff;

	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");

	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 20px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color var(--wcgeo-transition), box-shadow var(--wcgeo-transition);
}

.wcgeo-select:hover {
	border-color: var(--wcgeo-border-focus);
}

.wcgeo-select:focus {
	outline: none;
	border-color: var(--wcgeo-primary);
	box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.wcgeo-select:disabled {
	background-color: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
}

/* ==========================================
   Buttons
   ========================================== */
.wcgeo-actions {
	display: flex;
	justify-content: center;
	margin-top: 8px;
}

.wcgeo-btn {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	border-radius: var(--wcgeo-radius-sm);
	padding: 14px 32px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color var(--wcgeo-transition), transform var(--wcgeo-transition), box-shadow var(--wcgeo-transition);
}

.wcgeo-btn:active {
	transform: scale(0.98);
}

.wcgeo-btn--primary {
	background: var(--wcgeo-primary);
	color: #fff;
	min-width: 160px;
}

.wcgeo-btn--primary:hover {
	background: var(--wcgeo-primary-hover);
}

.wcgeo-btn--primary:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.3);
}

.wcgeo-btn--primary:disabled,
.wcgeo-btn--primary[data-wcgeo-busy="1"] {
	background: #9ca3af;
	cursor: wait;
}

.wcgeo-btn--ghost {
	background: transparent;
	border: 2px solid var(--wcgeo-border);
	color: var(--wcgeo-text);
}

.wcgeo-btn--ghost:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

/* ==========================================
   Error Message
   ========================================== */
.wcgeo-modal__error {
	display: none;
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: var(--wcgeo-radius-sm);
	background: var(--wcgeo-error-bg);
	border: 1px solid var(--wcgeo-error-border);
	color: var(--wcgeo-error-text);
	font-size: 14px;
	text-align: center;
	animation: wcgeo-shake 0.4s ease;
}

@keyframes wcgeo-shake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-5px); }
	40%, 80% { transform: translateX(5px); }
}

/* ==========================================
   Floating Action Button (FAB)
   ========================================== */
.wcgeo-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999998;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: none;
	border-radius: 50px;
	padding: 12px 18px;
	background: #ffffff;
	box-shadow: var(--wcgeo-shadow-sm);
	cursor: pointer;
	transition: transform var(--wcgeo-transition), box-shadow var(--wcgeo-transition);
}

.wcgeo-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.wcgeo-fab:active {
	transform: translateY(0);
}

.wcgeo-fab::before {
	content: "";
	width: 20px;
	height: 20px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231f2937'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	flex-shrink: 0;
}

.wcgeo-fab__label {
	font-size: 14px;
	font-weight: 600;
	color: white;
	white-space: nowrap;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wcgeo-fab__cta {
	font-size: 13px;
	font-weight: 600;
	color: white;
	border-left: 1px solid var(--wcgeo-border);
	padding-left: 10px;
	white-space: nowrap;
}

/* ==========================================
   Inline Selector (Shortcode)
   ========================================== */
.wcgeo-inline-selector {
	display: inline-flex;
}

.wcgeo-inline-selector .wcgeo-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
}

.wcgeo-inline-selector .wcgeo-btn::before {
	content: "";
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231f2937'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

/* ==========================================
   Responsive Styles
   ========================================== */
@media (max-width: 600px) {
	.wcgeo-modal__dialog {
		padding: 24px 20px;
		margin: 16px;
		max-height: calc(100vh - 32px);
		overflow-y: auto;
	}

	.wcgeo-modal__title {
		font-size: 20px;
	}

	.wcgeo-modal__hint {
		font-size: 14px;
	}

	.wcgeo-select {
		padding: 12px 14px;
		font-size: 16px;
	}

	.wcgeo-btn--primary {
		width: 100%;
	}

	.wcgeo-fab {
		right: 12px;
		bottom: 12px;
		padding: 10px 14px;
	}

	.wcgeo-fab__label {
		max-width: 120px;
		font-size: 13px;
	}

	.wcgeo-fab__cta {
		font-size: 12px;
	}
}

/* ==========================================
   Print Styles - Hide Modal & FAB
   ========================================== */
@media print {
	.wcgeo-modal,
	.wcgeo-fab,
	.wcgeo-inline-selector {
		display: none !important;
	}
}

/* ==========================================
   Disabled Checkout Fields Styles
   ========================================== */
.wcgeo-disabled-field {
	background-color: #f3f4f6 !important;
	color: #6b7280 !important;
	cursor: not-allowed !important;
	opacity: 0.7 !important;
}

.wcgeo-disabled-field:disabled,
.wcgeo-disabled-field[disabled] {
	background-color: #f3f4f6 !important;
	color: #6b7280 !important;
	cursor: not-allowed !important;
}

.wcgeo-disabled-field:focus,
.wcgeo-disabled-field[disabled]:focus {
	outline: none !important;
	box-shadow: none !important;
	border-color: #d1d5db !important;
}

