/* Unit Converter — tool-specific styles */
body.page-unit-conv { height: auto; min-height: 100vh; overflow: auto; }

.uc-wrap {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Top tabs */
.uc-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.uc-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.uc-tab.active { background: #fff; color: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Panel */
.uc-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Category bar */
.uc-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.uc-cat-btn {
  padding: 5px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
  white-space: nowrap;
}
.uc-cat-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.uc-cat-btn:hover:not(.active) { background: #e2e8f0; color: #1e293b; }

/* Converter row */
.uc-conv-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.uc-conv-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.uc-select-unit {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}
.uc-select-unit:focus { border-color: #2563eb; }
.uc-val-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}
.uc-val-input:focus { border-color: #2563eb; }
.uc-val-input[readonly] { background: #f8fafc; color: #2563eb; }

.uc-swap-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  align-self: center;
  transition: background 0.1s;
}
.uc-swap-btn:hover { background: #e2e8f0; }

/* Formula */
.uc-formula {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  min-height: 18px;
}

/* All-units table */
.uc-all-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.uc-all-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.uc-all-table th {
  background: #f8fafc;
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}
.uc-all-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}
.uc-all-table tr:last-child td { border-bottom: none; }
.uc-all-table td:last-child { font-weight: 600; color: #1e293b; text-align: right; }
.uc-all-table tr.uc-row-active td { background: #eff6ff; }
.uc-all-table tr.uc-row-active td:last-child { color: #2563eb; }

/* Currency */
.uc-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.uc-rate-info {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}
.uc-curr-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.uc-curr-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.uc-curr-table th {
  background: #f8fafc;
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}
.uc-curr-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}
.uc-curr-table tr:last-child td { border-bottom: none; }
.uc-curr-table td:last-child { font-weight: 600; color: #1e293b; text-align: right; }

/* Time Zone */
.uc-tz-grid {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.uc-tz-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.uc-tz-date, .uc-tz-time {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
}
.uc-tz-date:focus, .uc-tz-time:focus { border-color: #2563eb; }
.uc-tz-local { font-size: 11px; color: #94a3b8; min-height: 16px; }
.uc-tz-swap { align-self: center; margin-top: 24px; }
.uc-tz-result {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100px;
  justify-content: center;
}
.uc-tz-result .tz-time {
  font-size: 28px;
  font-weight: 700;
  color: #2563eb;
  line-height: 1.1;
}
.uc-tz-result .tz-date { font-size: 13px; color: #475569; }
.uc-tz-result .tz-offset { font-size: 12px; color: #94a3b8; }

.uc-tz-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.uc-tz-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.uc-tz-table th {
  background: #f8fafc;
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}
.uc-tz-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}
.uc-tz-table tr:last-child td { border-bottom: none; }
.uc-tz-table td.tz-city { font-weight: 600; color: #1e293b; }
.uc-tz-table td.tz-t { font-weight: 600; color: #2563eb; text-align: right; }

.uc-err { font-size: 13px; color: #dc2626; text-align: center; padding: 12px 0; }
.uc-loading { font-size: 13px; color: #94a3b8; text-align: center; padding: 12px 0; }

@media (max-width: 600px) {
  .uc-conv-row { flex-direction: column; }
  .uc-swap-btn { transform: rotate(90deg); align-self: flex-start; }
  .uc-tz-grid { flex-direction: column; }
  .uc-tz-swap { transform: rotate(90deg); align-self: flex-start; margin-top: 0; }
}
