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

body {
  padding: 20px;
  text-align: center;
  position: relative;
  font-family: Helvetica, Arial, sans-serif;
}

h1 {
  font-size: 50px;
  margin-bottom: 12px;
}

.mode-badge {
  cursor: pointer;
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 8px;
  user-select: none;
}

.mode-badge.fake {
  background: #444;
  color: #fff;
}

.mode-badge.live {
  background: #c62828;
  color: #fff;
}

#last-updated {
  font-size: 28px;
  margin-bottom: 32px;
}

/* refresh: top-left */
#refresh-btn {
  position: absolute;
  top: 14px;
  left: 14px;

  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);

  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;

  cursor: pointer;
  user-select: none;

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(0, 0, 0, 0.06);

  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, opacity 120ms ease;
}

#refresh-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

#refresh-btn:active:not(:disabled) {
  transform: translateY(0px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 14px rgba(0, 0, 0, 0.06);
}

#refresh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* container */
#container {
  width: 100%;
  padding: 0 32px;
  box-sizing: border-box;
}

.transit-line {
  margin-bottom: 60px;
  text-align: left;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.transit-line-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transit-line-logo span {
  color: white;
  font-size: 36px;
  display: inline-block;
}

.transit-line-destination {
  font-size: 30px;
  font-weight: normal;
}

.transit-line-arrivals {
  font-size: 40px;
  font-weight: bold;
  margin-left: 106px;
}

.empty-state {
  margin-top: 32px;
  font-size: 22px;
  opacity: 0.85;
}

/* lock: top-right */
.icon-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.9;
  transition: transform 120ms ease, opacity 120ms ease;
}

.icon-btn:active {
  transform: scale(0.98);
}

.icon-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal {
  width: min(560px, 100%);
  background: #fff;
  color: #111;
  border-radius: 12px;
  padding: 18px 18px 16px;
  text-align: left;
}

.modal h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.modal-subtext {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.modal-subtext-tight {
  margin-bottom: 8px;
}

.modal-subtext a {
  color: #1a73e8;
  text-decoration: none;
}

.modal-subtext a:hover {
  text-decoration: underline;
}

.modal-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
}

.modal-input:focus {
  border-color: #1a73e8;
}

.modal-divider {
  margin: 14px 0;
  opacity: 0.2;
}

.modal-error {
  margin-top: 12px;
  color: #b00020;
  font-size: 14px;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-actions-tight {
  margin-top: 10px;
}

.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
}

.btn-secondary {
  background: #eee;
  color: #111;
}

.hidden {
  display: none;
}

/* inline stop editor */
.transit-line.is-clickable {
  cursor: pointer;
}

.stop-editor-row {
  margin-left: 106px;
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.stop-editor-label {
  font-size: 14px;
  opacity: 0.85;
}

.stop-editor-input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 170px;
  font-size: 14px;
}

.stop-editor-actions {
  display: flex;
  gap: 10px;
}

.stop-editor-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.stop-editor-btn.danger {
  background: #b00020;
  color: #fff;
}

.stop-editor-error {
  margin-left: 106px;
  margin-top: 8px;
  color: #b00020;
  font-size: 14px;
}

/* stop controls */
#stop-controls {
  width: 100%;
  padding: 0 32px 40px;
  box-sizing: border-box;
  text-align: left;
}

/* add stop row */
.transit-line.add-stop {
  opacity: 0.85;
}

.transit-line.add-stop.is-clickable:hover {
  opacity: 1;
}

.transit-line-logo.add-stop-logo {
  opacity: 0.28;
}

.transit-line.add-stop .transit-line-destination {
  opacity: 0.7;
  font-style: italic;
}

.transit-line.add-stop .transit-line-arrivals {
  opacity: 0.25;
  font-style: italic;
}
