/* GLOBAL SETTINGS */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fff;
  overflow-x: hidden;
  font-family: Helvetica, Arial, sans-serif;
}

/* disable text select */
* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

a {
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
}

/* disable scrollbar chrome safari opera */
::-webkit-scrollbar {
  display: none;
}

/* disable scrollbar ie edge firefox */
html, body {
  -ms-overflow-style: none;  
  scrollbar-width: none;  
  overflow-y: scroll; 
}

/* LAYOUT SPACING */
.page-wrapper {
  padding: 8vh 8vw 5vh 8vw;
  display: flex;
  flex-direction: column;
  min-height: 85vh;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.nav-left {
  text-align: left;
}

.nav-right {
  text-align: right;
}

/* TYPOGRAPHY */
.arr {
  font-size: 2.6rem;
  font-weight: 400; 
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.05;
  display: block; 
}

/* compress rightside text */
.nav-right .arr {
  letter-spacing: -0.02em; 
}

.arr-bold {
  font-weight: 700 !important;
}

#listen-link {
  font-size: 2.6rem; 
  font-weight: 700; 
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: inline-block;
  letter-spacing: -0.02em;
}

#listen-link:hover {
  opacity: 0.8;
}

/* --------------------
   TEXT ANIMATIONS
   -------------------- */

/* FADE SEQUENCE */
/* smooth transition between black and red */
@keyframes listenFade {
  0% { color: rgba(0, 0, 0, 0.85); }
  50% { color: #c70000; }
  100% { color: rgba(0, 0, 0, 0.85); }
}

/* IDLE STATE */
/* bind animation to specific element id to prevent css overrides */
#listen-link.idle-fade {
  animation: listenFade 3s ease-in-out infinite;
}

/* ECG CANVAS CONTAINER */
.ekg-container {
  width: 100%;
  margin-top: 1vh;
  margin-bottom: 1vh; 
  display: flex;
  justify-content: center;
  align-items: center;
}

svg {
  display: block;
  width: 100%;
  height: 12vh;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#ekg-path {
  stroke: red !important;
  vector-effect: non-scaling-stroke;
}

/* BOTTOM INFO */
.bottom-info {
  width: 100%;
}

.hx {
  font-size: 1.4rem;
  font-weight: 400; 
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.2;
  display: block;
  text-align: left; 
}

.hx a {
  text-decoration: underline;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
  .page-wrapper {
    padding: 6vh 5vw;
  }
  
  /* scale font viewport width */
  .arr, #listen-link {
    font-size: 5.5vw;
    line-height: 1.1;
  }
  
  svg {
    height: 10vh;
  }
  
  .hx {
    font-size: 0.9rem;
  }
}

/* MODAL OVERLAY */
#archive-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  z-index: 10000;
  pointer-events: none;
}

#archive-overlay.hidden {
  display: none;
}

/* DRAGGABLE MODAL BOX */
#archive-modal {
  position: absolute;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%); 
  width: 90%;
  max-width: 650px;
  background-color: #ffffff;
  border: 2px solid #000000;
  box-shadow: none;        
  font-family: monospace;
  color: #000;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  pointer-events: auto; 
}

.modal-header {
  background-color: #ff0000;
  color: #ffffff;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
  cursor: grab; 
  user-select: none; 
  font-family: Helvetica, Arial, sans-serif;
}

.modal-header:active {
  cursor: grabbing;
}

#close-modal {
  background: none;
  border: none;
  color: #ffffff;
  font-family: monospace;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}

#close-modal:hover {
  color: #000;
}

/* MODAL CONTENT */
.modal-body {
  padding: 20px;
  overflow-y: scroll !important; 
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

.modal-body::-webkit-scrollbar {
  display: none;
}

.status-text {
  color: #ff0000;
  font-weight: bold;
  margin-top: 0;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 10px;
}

.instruction-text {
  font-size: 14px;
  margin-bottom: 15px;
}

.archive-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.archive-list li {
  margin-bottom: 8px;
}

.archive-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid #ccc;
  padding: 10px;
  font-family: monospace;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.1s ease-in-out;
}

.archive-btn span {
  font-weight: bold;
  color: #ff0000;
  margin-right: 10px;
}

.archive-btn:hover {
  background-color: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
}

.archive-btn:hover span {
  color: #ffffff;
}

/* VIEW TOGGLING */
.hidden {
  display: none !important;
}

/* PLAYER UI */
#player-view {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#now-playing-title {
  word-wrap: break-word;
  font-size: 14px;
}

.player-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-btn {
  background: #ff0000;
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
}

.control-btn:hover {
  background: #000;
}

.outline-btn {
  background: transparent;
  color: #ff0000;
  border: 1px solid #ff0000;
  margin-top: 10px;
}

.outline-btn:hover {
  background: #ff0000;
  color: #fff;
}

#time-display {
  font-weight: bold;
}

/* SCRUBBER BAR */
#seek-bar {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  outline: none;
  cursor: pointer;
}

#seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 20px;
  background: #ff0000;
  cursor: pointer;
  border-radius: 0;
}

#seek-bar::-moz-range-thumb {
  width: 15px;
  height: 20px;
  background: #ff0000;
  cursor: pointer;
  border-radius: 0;
  border: none;
}

/* BLINKING LIVE TEXT ANIMATION */
.blinking-live {
  color: #8b0000 !important;
  animation: blinktext 1.2s ease-in-out infinite;
}

@keyframes blinktext {
  0% { opacity: 1; }
  50% { opacity: 0.15; }
  100% { opacity: 1; }
}

/* LIVE BROADCAST ANIMATION */
.blinking-dot {
  display: inline-block;
  animation: blinkdot 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  font-size: 14px;
  vertical-align: middle;
}

@keyframes blinkdot {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

/* SECONDARY OS WINDOWS */
.secondary-window {
  position: absolute;
  top: 25vh;
  left: 60%;
  width: 85%;
  max-width: 400px;
  background-color: #ffffff;
  border: 2px solid #000000;
  box-shadow: 5px 5px 0px rgba(0,0,0,0.2); 
  z-index: 10005; /* force above main terminal */
  display: flex;
  flex-direction: column;
}

.window-body {
  padding: 15px;
  background: #fff;
}