/* OBV OzyWooCommerce — Shortcode [obv_ozy_reserva_timer] */

.obv-reserva-timer--hidden {
	display: none !important;
}

.obv-reserva-timer {
	display: inline-block;
	background: #f0f9f0;
	border: 1px solid #4caf50;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	color: #1a3c1a;
	transition: border-color 0.3s ease, background 0.3s ease;
	box-sizing: border-box;
	width: 100%;
}

.obv-reserva-timer__inner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
}

.obv-reserva-timer__label {
	font-weight: 500;
	flex-shrink: 0;
}

.obv-reserva-timer__countdown {
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.03em;
	color: #2d7a2d;
	min-width: 4ch;
	flex-shrink: 0;
}

.obv-reserva-timer__bar-wrap {
	width: 100%;
	height: 4px;
	background: #e0e0e0;
	border-radius: 2px;
	overflow: hidden;
	flex-basis: 100%;
}

.obv-reserva-timer__bar {
	height: 100%;
	width: 100%;
	background: #4caf50;
	border-radius: 2px;
	transition: width 0.9s linear, background-color 0.5s ease;
}

.obv-reserva-timer__booking-wrap {
	font-size: 12px;
	color: #666;
	flex-basis: 100%;
}

.obv-reserva-timer__booking-id {
	font-size: 11px;
	background: rgba(0, 0, 0, 0.06);
	padding: 1px 5px;
	border-radius: 3px;
	word-break: break-all;
}

/* Estado urgente: menos de 2 minutos */
.obv-reserva-timer--urgent {
	background: #fff5f5;
	border-color: #e53e3e;
	color: #742a2a;
}

.obv-reserva-timer--urgent .obv-reserva-timer__countdown {
	color: #e53e3e;
	animation: obv-timer-pulse 1s ease-in-out infinite;
}

@keyframes obv-timer-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.45; }
}

/* Estado expirado */
.obv-reserva-timer--expired {
	background: #fafafa;
	border-color: #bbb;
	opacity: 0.65;
}

/* ── Modal de alerta de tiempo ──────────────────────────────────────────── */

.obv-timer-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.obv-timer-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.52);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.obv-timer-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 14px;
	padding: 38px 30px 28px;
	max-width: 370px;
	width: calc(100% - 32px);
	text-align: center;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
	animation: obv-modal-in 0.2s ease;
}

@keyframes obv-modal-in {
	from { opacity: 0; transform: scale(0.9) translateY(-16px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.obv-timer-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	cursor: pointer;
	color: #aaa;
	padding: 6px;
	line-height: 1;
	border-radius: 50%;
	transition: color 0.2s, background 0.2s;
}
.obv-timer-modal__close:hover {
	color: #444;
	background: #f0f0f0;
}

.obv-timer-modal__icon {
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.obv-timer-modal__subtitle {
	font-size: 13px;
	color: #888;
	margin: 0 0 8px;
	font-weight: 500;
}

.obv-timer-modal__title {
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 12px;
	line-height: 1.35;
}

.obv-timer-modal__body {
	font-size: 14px;
	color: #666;
	margin: 0 0 26px;
}

.obv-timer-modal__remaining {
	color: #e53e3e;
	font-variant-numeric: tabular-nums;
}

/* Botones del modal */

.obv-timer-modal__btn {
	display: block;
	width: 100%;
	padding: 14px 16px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.18s, background 0.18s, border-color 0.18s;
	margin-bottom: 10px;
	border: none;
	line-height: 1.2;
}

.obv-timer-modal__btn--extend {
	background: #e53e3e;
	color: #fff;
}
.obv-timer-modal__btn--extend:hover:not(:disabled) { background: #c53030; }
.obv-timer-modal__btn--extend:disabled { opacity: 0.6; cursor: wait; }

.obv-timer-modal__btn--dismiss {
	background: #fff;
	color: #333;
	border: 1.5px solid #d8d8d8;
}
.obv-timer-modal__btn--dismiss:hover { background: #f5f5f5; }

.obv-timer-modal__btn--cancel {
	background: none;
	border: none;
	color: #aaa;
	font-size: 13px;
	font-weight: 500;
	padding: 4px 8px;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	margin-bottom: 0;
	transition: color 0.18s;
}
.obv-timer-modal__btn--cancel:hover:not(:disabled) { color: #e53e3e; }
.obv-timer-modal__btn--cancel:disabled { opacity: 0.5; cursor: wait; }
