/* Gate Board Specific Styles - Viewport Adaptive */

.gate-board-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

/* Header Styles */
.gate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.8rem, 2vh, 2rem) clamp(1rem, 3vw, 3rem);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: clamp(2px, 0.4vh, 4px) solid #e94560;
  flex-shrink: 0;
}

.gate-info {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
}

.terminal-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: clamp(0.4rem, 1.2vh, 1.2rem) clamp(0.8rem, 2vw, 2rem);
  border-radius: clamp(8px, 1.2vw, 15px);
  font-size: clamp(1.2rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: clamp(1px, 0.2vw, 3px);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0.8vh 2.5vh rgba(102, 126, 234, 0.4);
}

.gate-badge {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  color: white;
  padding: clamp(0.5rem, 1.5vh, 1.5rem) clamp(1rem, 2.5vw, 2.5rem);
  border-radius: clamp(10px, 1.5vw, 20px);
  font-size: clamp(1.5rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: clamp(2px, 0.3vw, 5px);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 1vh 3vh rgba(233, 69, 96, 0.4);
}

.gate-header .clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Courier New', monospace;
  color: #00ff88;
  text-shadow: 0 0 2vh rgba(0, 255, 136, 0.5);
  line-height: 1.1;
}

.time-24h {
  font-size: clamp(1.5rem, 4vw, 4rem);
  font-weight: 700;
}

.time-12h {
  font-size: clamp(0.8rem, 2vw, 2rem);
  font-weight: 500;
  opacity: 0.85;
  margin-top: 0.2em;
}

/* Main Content */
.gate-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(0.5rem, 2vh, 2rem) clamp(0.5rem, 2vw, 2rem);
  gap: clamp(0.5rem, 1.5vh, 1.5rem);
  min-height: 0;
  overflow: auto;
}

/* Unified Notification Banner */
.gate-notifications {
  width: 100%;
  flex-shrink: 0;
}

.gate-notification {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  padding: clamp(1rem, 2.5vh, 2rem) clamp(1.5rem, 3vw, 3rem);
  border-radius: clamp(10px, 2vw, 20px);
}

.gate-change-notification {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  box-shadow: 0 1vh 3vh rgba(255, 152, 0, 0.4);
  animation: pulse-gate-change 2s infinite;
}

.cancelled-notification {
  background: linear-gradient(135deg, #e94560 0%, #c0392b 100%);
  box-shadow: 0 1vh 3vh rgba(233, 69, 96, 0.4);
  animation: pulse-cancelled 2s infinite;
}

@keyframes pulse-gate-change {
  0%, 100% { box-shadow: 0 1vh 3vh rgba(255, 152, 0, 0.4); }
  50%       { box-shadow: 0 1vh 5vh rgba(255, 152, 0, 0.7); }
}

@keyframes pulse-cancelled {
  0%, 100% { box-shadow: 0 1vh 3vh rgba(233, 69, 96, 0.4); }
  50%       { box-shadow: 0 1vh 5vh rgba(233, 69, 96, 0.7); }
}

.notif-icon {
  font-size: clamp(2rem, 5vw, 4rem);
  flex-shrink: 0;
}

.notif-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(0.3rem, 0.8vh, 0.5rem);
}

.notif-title {
  font-size: clamp(0.9rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: white;
  letter-spacing: clamp(1px, 0.3vw, 3px);
  text-transform: uppercase;
}

.notif-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  font-size: clamp(1rem, 2.5vw, 1.8rem);
  color: white;
}

.notif-route {
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
  padding: clamp(0.2rem, 0.5vh, 0.4rem) clamp(0.5rem, 1vw, 1rem);
  border-radius: 6px;
}

.notif-dest { font-weight: 600; }

.notif-time {
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.2);
  padding: clamp(0.2rem, 0.5vh, 0.4rem) clamp(0.5rem, 1vw, 1rem);
  border-radius: 6px;
}

.notif-arrow {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff3e0;
}

.notif-new {
  font-weight: 800;
  background: rgba(255, 255, 255, 0.95);
  color: #e65100;
  padding: clamp(0.3rem, 0.8vh, 0.5rem) clamp(0.8rem, 1.5vw, 1.2rem);
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Delayed Time Display - Gate Board */
.original-time-large {
  text-decoration: line-through;
  opacity: 0.5;
  font-size: clamp(1.5rem, 6vw, 5rem);
  display: block;
}

.delayed-time-large {
  color: #ff9800;
  font-weight: 800;
  text-shadow: 0 0 3vh rgba(255, 152, 0, 0.6);
  display: block;
}

.departure-time-large.delayed {
  display: flex;
  flex-direction: column;
  gap: clamp(0.3rem, 1vh, 0.5rem);
}

.original-time-small {
  text-decoration: line-through;
  opacity: 0.5;
  font-size: 0.7em;
  display: block;
}

.delayed-time-small {
  color: #ff9800;
  font-weight: 700;
  display: block;
}

.following-time.delayed {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Single Notice Display - Only show active notice */
.gate-change-alert {
  display: none;
}

.gate-change-alert.active {
  display: flex;
}

/* Notice Rotation Indicator */
.notice-indicator {
  display: flex;
  justify-content: center;
  gap: clamp(0.3rem, 1vw, 0.5rem);
  margin-top: clamp(0.3rem, 1vh, 0.5rem);
}

.notice-dot {
  width: clamp(8px, 1.5vw, 12px);
  height: clamp(8px, 1.5vw, 12px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s;
}

.notice-dot.active {
  background: #ff9800;
}

/* Departures Wrapper - Side by Side Layout */
.departures-wrapper {
  display: flex;
  flex-direction: row;
  gap: clamp(0.5rem, 2vw, 2rem);
  width: 100%;
  flex: 1;
  min-height: 0;
}

.primary-card {
  flex: 2;
  min-width: 0;
}

.secondary-card {
  flex: 1;
  min-width: min(30vw, 350px);
  max-width: min(35vw, 400px);
}

/* Departure Cards */
.next-departure-card,
.following-departure-card {
  background: rgba(255, 255, 255, 0.05);
  border: clamp(1px, 0.3vh, 3px) solid rgba(255, 255, 255, 0.1);
  border-radius: clamp(15px, 3vw, 40px);
  padding: clamp(1rem, 3vh, 4rem) clamp(1.5rem, 4vw, 5rem);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 2vh 6vh rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  overflow: hidden;
}

.following-departure-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.next-label,
.following-label {
  font-size: clamp(0.9rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: clamp(2px, 0.5vw, 6px);
  color: #e94560;
  margin-bottom: clamp(0.5rem, 1.5vh, 1.5rem);
  text-transform: uppercase;
}

.following-label {
  color: #74b9ff;
  font-size: clamp(0.8rem, 2vw, 1.5rem);
}

.departure-time-large {
  font-size: clamp(2.5rem, 10vw, 10rem);
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: #00ff88;
  text-shadow: 0 0 4vh rgba(0, 255, 136, 0.6);
  margin-bottom: clamp(0.5rem, 1.5vh, 2rem);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.following-time {
  font-size: clamp(2rem, 6vw, 6rem);
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #74b9ff;
  text-shadow: 0 0 3vh rgba(116, 185, 255, 0.5);
  margin-bottom: clamp(0.5rem, 1.5vh, 1.5rem);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.departure-details {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vh, 2rem);
  margin-bottom: clamp(1rem, 2.5vh, 3rem);
}

.detail-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2vw, 3rem);
  flex-wrap: wrap;
}

.detail-label {
  font-size: clamp(0.8rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: clamp(1px, 0.3vw, 3px);
  min-width: clamp(80px, 12vw, 150px);
  text-align: right;
}

.detail-value {
  font-size: clamp(1.2rem, 3.5vw, 3rem);
  font-weight: 600;
  min-width: clamp(150px, 25vw, 350px);
  text-align: left;
}

.destination-value {
  color: #ffd700;
  font-size: clamp(1.2rem, 3.5vw, 3rem);
}

.route-value {
  color: #00d9ff;
}

.terminal-value {
  color: #ff9f43;
}

/* Following Departure Styles */
.following-details {
  display: flex;
  flex-direction: column;
  gap: clamp(0.3rem, 1vh, 0.8rem);
  margin-bottom: clamp(0.5rem, 1.5vh, 1.5rem);
}

.following-dest {
  font-size: clamp(1rem, 2.5vw, 2rem);
  font-weight: 600;
  color: #ffd700;
}

.following-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
}

.following-route {
  color: #00d9ff;
}

.following-terminal {
  color: #ff9f43;
}

.following-status {
  display: inline-block;
  padding: clamp(0.3rem, 1vh, 0.8rem) clamp(0.8rem, 2vw, 1.5rem);
  border-radius: 30px;
  font-size: clamp(0.8rem, 2vw, 1.3rem);
  font-weight: 600;
  letter-spacing: clamp(1px, 0.3vw, 3px);
  margin-top: auto;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: clamp(0.5rem, 1.5vh, 1.5rem) clamp(1.5rem, 4vw, 4rem);
  border-radius: 50px;
  font-size: clamp(1rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: clamp(2px, 0.4vw, 4px);
}

.status-on-time {
  background: linear-gradient(135deg, #00b894 0%, #00d9a5 100%);
  color: white;
  box-shadow: 0 1vh 3vh rgba(0, 184, 148, 0.4);
}

.status-delayed {
  background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
  color: #2d3436;
  box-shadow: 0 1vh 3vh rgba(253, 203, 110, 0.4);
}

.status-boarding {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: white;
  box-shadow: 0 1vh 3vh rgba(116, 185, 255, 0.4);
  animation: pulse 1.5s infinite;
}

.status-cancelled {
  background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
  color: white;
  box-shadow: 0 1vh 3vh rgba(255, 118, 117, 0.4);
}

.status-departed {
  background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1vh 3vh rgba(99, 110, 114, 0.4);
}

.status-delayed {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  box-shadow: 0 1vh 3vh rgba(255, 152, 0, 0.5);
  animation: pulse-delayed-gate 2s infinite;
}

@keyframes pulse-delayed-gate {
  0%, 100% { box-shadow: 0 1vh 3vh rgba(255, 152, 0, 0.5); }
  50% { box-shadow: 0 1vh 4vh rgba(255, 152, 0, 0.7); }
}

.following-status.status-delayed,
.later-status.status-delayed {
  background: rgba(255, 152, 0, 0.3);
  color: #ff9800;
}

.following-status.status-departed {
  background: rgba(99, 110, 114, 0.5);
  color: rgba(255, 255, 255, 0.6);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Later Departures Section */
.later-section {
  background: rgba(255, 255, 255, 0.02);
  border-radius: clamp(10px, 2vw, 25px);
  padding: clamp(0.8rem, 2vh, 2rem);
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.later-section h3 {
  font-size: clamp(0.8rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: clamp(0.5rem, 1.5vh, 1rem);
  text-transform: uppercase;
  letter-spacing: clamp(2px, 0.4vw, 4px);
  text-align: center;
}

.later-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  justify-content: center;
}

.later-item {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1rem);
  padding: clamp(0.4rem, 1vh, 0.8rem) clamp(0.8rem, 1.5vw, 1.5rem);
  background: rgba(255, 255, 255, 0.04);
  border-radius: clamp(6px, 1vw, 12px);
  font-size: clamp(0.85rem, 1.8vw, 1.2rem);
  flex: 1;
  min-width: min(250px, 80vw);
  max-width: min(350px, 45vw);
}

.later-time {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: #00ff88;
}

.later-route {
  font-weight: 600;
  color: #00d9ff;
}

.later-dest {
  color: white;
  flex: 1;
  text-align: left;
}

.later-status {
  padding: clamp(0.2rem, 0.6vh, 0.5rem) clamp(0.4rem, 1vw, 0.8rem);
  border-radius: 15px;
  font-size: clamp(0.7rem, 1.4vw, 1rem);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.later-status.status-departed {
  background: rgba(99, 110, 114, 0.3);
  color: rgba(255, 255, 255, 0.4);
}

/* No Departures State */
.no-departures {
  text-align: center;
  padding: clamp(2rem, 8vh, 8rem) clamp(1rem, 4vw, 4rem);
}

.no-departures-icon {
  font-size: clamp(3rem, 10vw, 8rem);
  margin-bottom: clamp(1rem, 3vh, 3rem);
  opacity: 0.5;
}

.no-departures h2 {
  font-size: clamp(1.5rem, 5vw, 4rem);
  margin-bottom: clamp(0.5rem, 2vh, 2rem);
  color: rgba(255, 255, 255, 0.8);
}

.no-departures p {
  font-size: clamp(1rem, 3vw, 2rem);
  color: rgba(255, 255, 255, 0.5);
}

/* Footer */
.gate-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(0.8rem, 2vh, 1.5rem) clamp(1rem, 3vw, 3rem);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.event-branding {
  font-size: clamp(0.8rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: clamp(1px, 0.3vw, 3px);
}

/* Language Indicator Override */
.gate-board-container .language-indicator {
  background: rgba(233, 69, 96, 0.9);
  color: white;
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  padding: clamp(0.3rem, 1vh, 0.6rem) clamp(0.5rem, 1.5vw, 1rem);
}

/* Landscape orientation - side by side cards */
@media (orientation: landscape) and (max-height: 700px) {
  .departures-wrapper {
    flex-direction: row;
  }
  
  .secondary-card {
    max-width: min(30vw, 300px);
  }
  
  .departure-time-large {
    font-size: clamp(2rem, 12vh, 8rem);
  }
  
  .following-time {
    font-size: clamp(1.5rem, 8vh, 5rem);
  }
}

/* Portrait orientation - stacked cards */
@media (orientation: portrait), (max-width: 900px) {
  .departures-wrapper {
    flex-direction: column;
  }
  
  .secondary-card {
    max-width: 100%;
    flex: none;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(0.5rem, 2vw, 1rem);
    align-items: center;
    text-align: left;
    padding: clamp(0.8rem, 2vh, 1.5rem) clamp(1rem, 3vw, 2rem);
  }
  
  .secondary-card .following-label {
    grid-column: 1;
    margin-bottom: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
  }
  
  .secondary-card .following-time {
    grid-column: 2;
    margin-bottom: 0;
    align-items: flex-start;
  }
  
  .secondary-card .following-details {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 0;
  }
  
  .secondary-card .following-status {
    grid-column: 3;
    grid-row: 1 / 3;
    margin-top: 0;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .departures-wrapper {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .secondary-card {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.8rem;
  }
  
  .secondary-card .following-label {
    font-size: 0.7rem;
    margin-bottom: 0;
  }
  
  .secondary-card .following-time {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  
  .secondary-card .following-details {
    display: none;
  }
  
  .secondary-card .following-status {
    font-size: 0.8rem;
    margin-top: 0;
    margin-left: auto;
  }
  
  .later-list {
    flex-direction: column;
  }
  
  .later-item {
    max-width: 100%;
    min-width: auto;
  }
  
  .detail-row {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .detail-label {
    text-align: center;
    min-width: auto;
  }
  
  .detail-value {
    text-align: center;
    min-width: auto;
  }
  
  .gate-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
