/**
 * Temporal HUD Styling
 * Part of TGS (Temporal Grounding System)
 */

.temporal-hud {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
  border: 2px solid #00ff41;
  border-radius: 12px;
  padding: 15px 20px;
  min-width: 280px;
  box-shadow: 0 4px 20px rgba(0, 255, 65, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
}

.temporal-hud:hover {
  box-shadow: 0 6px 30px rgba(0, 255, 65, 0.5);
  transform: translateY(-2px);
}

.temporal-hud-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* Date & Time */
.temporal-datetime {
  text-align: center;
  border-bottom: 1px solid rgba(0, 255, 65, 0.3);
  padding-bottom: 10px;
}

.temporal-date {
  color: #ffd700;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.temporal-time {
  color: #00ff41;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Status Indicator (Big & Prominent) */
.temporal-status-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid;
  transition: all 0.3s ease;
}

.status-badge.open {
  border-color: #00ff41;
  background: rgba(0, 255, 65, 0.1);
}

.status-badge.closed {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.1);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.open .status-dot {
  background: #00ff41;
  box-shadow: 0 0 10px #00ff41;
}

.status-badge.closed .status-dot {
  background: #ff0000;
  box-shadow: 0 0 10px #ff0000;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.status-text {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
}

.status-badge.open .status-text {
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.status-badge.closed .status-text {
  color: #ff0000;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}

/* Day of Week */
.temporal-day {
  text-align: center;
  color: #aaa;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Special Notes */
.temporal-notes {
  border-top: 1px solid rgba(0, 255, 65, 0.3);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-item {
  background: rgba(255, 215, 0, 0.1);
  border-left: 3px solid #ffd700;
  padding: 6px 10px;
  border-radius: 4px;
  color: #ffd700;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Info Button */
.temporal-info-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2a2a3e;
  border: 2px solid #444;
  color: #00ff41;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.temporal-info-btn:hover {
  background: #00ff41;
  border-color: #00ff41;
  color: #000;
  transform: scale(1.1);
}

.temporal-info-btn.active {
  background: #00ff41;
  border-color: #00ff41;
  color: #000;
}

/* Expanded Details Panel */
.temporal-details-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 255, 65, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: #aaa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: #00ff41;
  font-size: 12px;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .temporal-hud {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: unset;
    padding: 12px 15px;
  }

  .temporal-time {
    font-size: 20px;
  }

  .status-text {
    font-size: 16px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .temporal-hud {
    top: 10px;
    right: 10px;
    left: auto;
    min-width: 200px;
    padding: 8px 12px;
  }

  .temporal-datetime {
    padding-bottom: 6px;
  }

  .temporal-time {
    font-size: 18px;
  }

  .status-badge {
    padding: 6px 12px;
  }

  .status-text {
    font-size: 14px;
  }

  .temporal-notes {
    padding-top: 6px;
  }

  .note-item {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* Compact Mode (when space is limited) */
.temporal-hud.compact {
  padding: 10px 12px;
  min-width: 200px;
}

.temporal-hud.compact .temporal-datetime {
  padding-bottom: 6px;
}

.temporal-hud.compact .temporal-date {
  font-size: 11px;
}

.temporal-hud.compact .temporal-time {
  font-size: 18px;
}

.temporal-hud.compact .status-badge {
  padding: 6px 12px;
}

.temporal-hud.compact .status-text {
  font-size: 14px;
}

.temporal-hud.compact .temporal-day {
  font-size: 11px;
}

/* Animation when status changes */
.status-badge {
  animation: statusChange 0.5s ease;
}

@keyframes statusChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Glow effect for open status */
.status-badge.open {
  animation: openGlow 2s ease-in-out infinite;
}

@keyframes openGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
  }
}

/* Closed status - no glow, just pulsing border */
.status-badge.closed {
  animation: closedPulse 1.5s ease-in-out infinite;
}

@keyframes closedPulse {
  0%, 100% {
    border-color: #ff0000;
  }
  50% {
    border-color: #cc0000;
  }
}
