/* Derby Webcams — visor con pestañas (alineado con el estilo general del sitio) */

.dw-widget {
	--dw-accent: #1d3c51;
	--dw-tab-bg: #f2f2f2;
	--dw-tab-bg-active: #ffffff;
	--dw-tab-text: #777777;
	--dw-tab-text-active: #1d3c51;
	--dw-border: #dddddd;
	--dw-radius: 4px;

	max-width: 100%;
	margin: 0 auto;
	font-family: inherit;
}

/* Texto descriptivo sobre las pestañas (tipografía la da la clase .h2 de Bootstrap) */
.dw-widget .dw-heading {
	margin-top: 0;
}

/* Barra superior: pestañas + reloj */
.dw-widget .dw-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

/* Barra de pestañas */
.dw-widget .dw-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* Reloj de Cádiz */
.dw-widget .dw-clock {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	color: var(--dw-tab-text);
	font-size: 13px;
	white-space: nowrap;
}

.dw-widget .dw-clock-label {
	text-transform: uppercase;
	letter-spacing: .04em;
}

.dw-widget .dw-clock-time {
	font-weight: 600;
	color: var(--dw-tab-text-active);
	font-feature-settings: "tnum" 1;
}

@media (max-width: 480px) {
	.dw-widget .dw-bar {
		justify-content: flex-start;
	}
}

.dw-widget .dw-tab {
	appearance: none;
	border: 1px solid var(--dw-border);
	background: var(--dw-tab-bg);
	color: var(--dw-tab-text);
	padding: 6px 14px;
	font-size: 14px;
	line-height: 1.4;
	border-radius: var(--dw-radius);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.dw-widget .dw-tab:hover {
	color: var(--dw-tab-text-active);
}

.dw-widget .dw-tab.is-active {
	background: var(--dw-accent);
	color: #ffffff;
	border-color: var(--dw-accent);
}

.dw-widget .dw-tab:focus-visible {
	outline: 2px solid var(--dw-accent);
	outline-offset: 2px;
}

/* Escenario del vídeo con relación de aspecto fija */
.dw-widget .dw-stage {
	position: relative;
	width: 100%;
	background: #000;
	border-radius: var(--dw-radius);
	overflow: hidden;
	border: 1px solid var(--dw-border);
}

.dw-widget.dw-ratio-16x9 .dw-stage {
	aspect-ratio: 16 / 9;
}

.dw-widget.dw-ratio-4x3 .dw-stage {
	aspect-ratio: 4 / 3;
}

/* Fallback para navegadores muy viejos sin aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
	.dw-widget .dw-stage {
		height: 0;
		padding-bottom: 56.25%;
	}
	.dw-widget.dw-ratio-4x3 .dw-stage {
		padding-bottom: 75%;
	}
}

.dw-widget .dw-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	border-radius: var(--dw-radius);
	overflow: hidden;
}

.dw-widget .dw-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #adb5bd;
	font-size: 14px;
	pointer-events: none;
}

/* Badge "LIVE" */
.dw-widget .dw-live {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	background: rgba(0, 0, 0, .55);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-radius: var(--dw-radius);
	pointer-events: none;
}

.dw-widget .dw-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #e5383b;
	animation: dw-live-pulse 1.6s ease-in-out infinite;
}

@keyframes dw-live-pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: .35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dw-widget .dw-live-dot {
		animation: none;
	}
}

/* Espaciado del contenedor cuando el widget va envuelto en .container */
.dw-home-container {
	padding-top: 20px;
	padding-bottom: 20px;
}
