/* tools/timestamp/css/style.css */

/* ── Live clock bar ───────────────────────────────────────────── */
#clock-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: #11111b;
  border-bottom: 2px solid #89b4fa;
  font-size: 14px;
  flex-wrap: wrap;
}

#clock-label {
  color: #6c7086;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.clock-value {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #cdd6f4;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: 4px 10px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.clock-value.mono {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 15px;
  color: #89b4fa;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.clock-value:hover {
  border-color: #89b4fa;
  background: #1e1e2e;
  color: #cdd6f4;
}

.clock-sep { color: #45475a; padding: 0 2px; font-size: 16px; }

#clock-tz-badge {
  margin-left: auto;
  font-size: 11px;
  background: #313244;
  color: #89b4fa;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── Converter area ───────────────────────────────────────────── */
#converter-area {
  display: flex;
  gap: 20px;
  padding: 24px 20px 16px;
  flex: 0 0 auto;
}

/* ── Cards ───────────────────────────────────────────────────── */
.conv-card {
  flex: 1;
  background: #1e1e2e;
  border: 2px solid #45475a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 0.15s;
}
.conv-card:focus-within {
  border-color: #89b4fa;
}

.conv-card-header {
  padding: 8px 14px;
  background: #181825;
  border-bottom: 1px solid #313244;
  border-radius: 6px 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #6c7086;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.conv-card-body {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Unix timestamp card internals ───────────────────────────── */
#ts-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#ts-input {
  flex: 1;
  background: #11111b;
  border: 1px solid #45475a;
  border-radius: 5px;
  color: #cdd6f4;
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 18px;
  letter-spacing: 0.03em;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
#ts-input:focus { border-color: #89b4fa; }
#ts-input::placeholder { color: #45475a; }

#ts-unit-toggle {
  display: flex;
  gap: 18px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #a6adc8;
  cursor: pointer;
  user-select: none;
}
.radio-label input[type="radio"] {
  accent-color: #89b4fa;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.radio-label:hover { color: #cdd6f4; }

#ts-hint {
  font-size: 12px;
  color: #6c7086;
  min-height: 16px;
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* ── Human date card internals ───────────────────────────────── */
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-label {
  width: 68px;
  flex-shrink: 0;
  font-size: 12px;
  color: #6c7086;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: right;
}

#date-input,
#time-input,
#tz-select {
  flex: 1;
  background: #11111b;
  border: 1px solid #45475a;
  border-radius: 5px;
  color: #cdd6f4;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
#date-input:focus,
#time-input:focus,
#tz-select:focus { border-color: #89b4fa; }

#tz-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c7086' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
#tz-select option { background: #1e1e2e; }

/* ── Copy buttons ─────────────────────────────────────────────── */
.btn-copy {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 4px;
  color: #6c7086;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.btn-copy:hover { color: #89b4fa; background: #313244; }
.btn-copy.copied { color: #a6e3a1; }

/* ── Relative time bar ────────────────────────────────────────── */
#relative-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #181825;
  border-top: 2px solid #313244;
  font-size: 14px;
  flex-wrap: wrap;
  margin: 0 0 0 0;
}

#relative-time {
  color: #a6e3a1;
  font-weight: 600;
  min-width: 160px;
}

.rel-sep { color: #45475a; }

#iso-string {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  color: #cba6f7;
  flex: 1;
  word-break: break-all;
}

.btn-copy-iso {
  margin-left: auto;
}

/* ── Error state ──────────────────────────────────────────────── */
.input-error {
  border-color: #f38ba8 !important;
}
#ts-hint.error { color: #f38ba8; }
