/* ============================================
   OSAMMVC Llamador - Display Styles
   Pantalla TV 1920x1080
   Paleta: pasteles verdes y azules (igual totems)
   ============================================ */

:root {
  --primary: #3BA99C;
  --primary-light: #6EC6B8;
  --primary-dark: #2D8075;
  --primary-pastel: #B2DFDB;

  --secondary: #5B9BD5;
  --secondary-light: #90CAF9;
  --secondary-dark: #3A7BBF;

  --accent-warm: #FFB74D;

  --bg-main: #C8E6DE;
  --bg-card: #FFFFFF;

  --text-primary: #263238;
  --text-secondary: #546E7A;
  --text-muted: #90A4AE;
  --text-white: #FFFFFF;

  --success: #66BB6A;
  --danger: #EF5350;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
}

/* ---- Layout principal ---- */
body {
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  z-index: 10;
  position: relative;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}

.header-logo {
  height: 70px;
  object-fit: contain;
}

.header-clock-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-hero {
  flex: 1;
  min-width: 0;
}

.ws-indicator {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.3s;
}
.ws-indicator.connected { color: var(--success); }
.ws-indicator.disconnected { color: var(--danger); }

.header-clock {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ---- Hero: ultimo llamado (inline en header, centrado) ---- */
.hero-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  padding: 4px 24px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-md);
  animation: heroIn 0.4s ease-out;
}

@keyframes heroIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes heroPulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 0 0 8px rgba(59, 169, 156, 0.3), var(--shadow-lg); }
}

.hero-card.pulse {
  animation: heroPulse 1s ease-in-out 3;
}

.hero-info {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.hero-name {
  font-size: 4vw;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.hero-line {
  font-size: 2.2vw;
  font-weight: 600;
  opacity: 0.9;
}

.hero-pc {
  font-size: 2.9vw;
  font-weight: 800;
  opacity: 0.95;
}

.hero-time {
  text-align: center;
  flex-shrink: 0;
}

.hero-time-value {
  font-size: 3.2vw;
  font-weight: 800;
}

.hero-time-label {
  font-size: 21px;
  opacity: 0.8;
}

.hero-empty-inline {
  text-align: center;
  padding: 10px;
  color: var(--text-muted);
  font-size: 26px;
}
.hero-empty-inline i {
  margin-right: 6px;
}

/* ---- Ticker / Banner ---- */
.ticker-banner {
  flex-shrink: 0;
  height: 40px;
  overflow: hidden;
  background: var(--primary-dark);
  position: relative;
}

.ticker-marquee {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: marqueeScroll 35s linear infinite;
  font-size: 25px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.5px;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.ticker-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticker-image img {
  height: 100%;
  object-fit: contain;
}

.ticker-banner .hidden {
  display: none;
}

/* ---- Content row: video left + list right ---- */
.content-row {
  flex: 1;
  display: flex;
  gap: 10px;
  padding: 6px 12px 8px;
  min-height: 0;
}

.video-section {
  width: 40%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.video-section iframe,
.video-section video {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: #000;
}

#tvplayer {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.sidebar-ad {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-ad img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-section .hidden {
  display: none !important;
}

.llamados-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.llamados-header {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.llamados-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.llamado-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--primary-pastel);
  transition: border-color 0.3s;
}

.llamado-card.recent {
  border-left-color: var(--accent-warm);
  animation: cardIn 0.3s ease-out;
}

@keyframes cardIn {
  from { transform: translateX(-10px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.llamado-avatar {
  width: 52px;
  height: 52px;
  background: var(--primary-pastel);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 32px;
  font-weight: 800;
  flex-shrink: 0;
}

.llamado-info {
  flex: 1;
  min-width: 0;
}

.llamado-name {
  font-size: 2.4vw;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  line-height: 1.15;
}

.llamado-detail {
  font-size: 1.6vw;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.15;
}

.llamado-meta {
  text-align: right;
  flex-shrink: 0;
}

.llamado-pc {
  font-size: 2.1vw;
  font-weight: 800;
  color: var(--primary-dark);
}

.llamado-time {
  font-size: 1.5vw;
  color: var(--text-muted);
  font-weight: 600;
}

.llamados-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 30px;
}
