@font-face {
  font-family: "Maison Neue Extended Bold";
  src: url("/fonts/MaisonNeueExtendedBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  --fgs-gray: #3c3f45;
  --fgs-muted: #9ca3af;
  --fgs-border: #e6e8ed;
  --fgs-pill: #f5f5f7;
  --fgs-red: #ef1f1f;
  --fgs-red-dark: #c81111;
  --fgs-bg: #ffffff;
}

body {
  margin: 0;
  background: #fefefe;
  color: #111315;
}

main#usage-check {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.usage-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.usage-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-family: "Maison Neue Extended Bold", "Inter", sans-serif;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  color: #16181c;
}

.usage-hero p {
  color: var(--fgs-muted);
  margin: 0;
}

.usage-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: end;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e9ebf0;
}

@media (min-width: 992px) {
  .usage-form {
    grid-template-columns: 2fr 2fr 1fr;
  }
}

.field span {
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
  color: var(--fgs-gray);
}

.label-with-help {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  position: relative;
}

.info-trigger {
  border: none;
  background: transparent;
  color: var(--fgs-muted);
  font-size: 0.95rem;
  padding: 0;
  cursor: help;
  line-height: 1;
}

.info-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  width: min(320px, 80vw);
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  background: #111315;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

.label-with-help:hover .info-tooltip,
.label-with-help:focus-within .info-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.range-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--fgs-gray);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.range-label small {
  font-weight: 500;
  color: var(--fgs-muted);
}

.iccid-field input,
.date-inputs input {
  width: 100%;
  border: 1px solid var(--fgs-border);
  border-radius: 0.75rem;
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  background: #fdfdfd;
}

.date-inputs {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.date-inputs label {
  display: flex;
  align-items: center;
  border: 1px solid var(--fgs-border);
  border-radius: 0.75rem;
  padding: 0.2rem 0.4rem 0.2rem 0.9rem;
  background: #fdfdfd;
}

.date-inputs label .icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 0.35rem;
}

.date-inputs label svg {
  width: 20px;
  height: 20px;
  color: var(--fgs-muted);
}

.date-inputs label input {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  background: transparent;
}

.date-inputs label input:focus,
.iccid-field input:focus {
  outline: none;
  border-color: var(--fgs-red);
}

@media (min-width: 768px) {
  .date-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

button[type="submit"] {
  border: none;
  border-radius: 999px;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--fgs-red);
  color: #fff;
  transition: background 0.2s ease, transform 0.15s ease;
}

button[type="submit"]:hover:not([disabled]) {
  background: var(--fgs-red-dark);
  transform: translateY(-1px);
}

button[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.form-error {
  margin: 1rem 0 0;
  text-align: center;
  color: #b91c1c;
  background: #feecee;
  border-radius: 18px;
  padding: 0.85rem 1rem;
}

.unsupported-panel {
  margin-top: 1rem;
  border: 1px solid var(--fgs-border);
  border-radius: 18px;
  padding: 1.25rem 1.1rem;
  background: #fff;
}

.unsupported-title {
  margin: 0 0 0.9rem;
  color: #111315;
  font-weight: 600;
}

.unsupported-steps p {
  margin: 0.45rem 0;
  color: #4a4f58;
}

.summary-info {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem;
  padding: 0;
}

@media (min-width: 768px) {
  .summary-info {
    padding: 0 1.75rem;
  }
}

.summary-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.summary-field span {
  font-size: 1rem;
  font-family: "Maison Neue Extended Bold", "Inter", sans-serif;
  letter-spacing: 0.02em;
  color: #111315;
}

.summary-field strong {
  font-size: 1rem;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  color: #4a4f58;
}

.summary-panel {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--fgs-border);
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: 0 18px 35px -18px rgba(17, 19, 21, 0.25);
}

.usage-table {
  margin-top: 0;
}

.usage-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  padding: 0.5rem;
}

.usage-table th {
  text-align: left;
  font-weight: 600;
  color: #111315;
  padding: 0.5rem;
  border-bottom: 1px solid var(--fgs-border);
  font-family: "Maison Neue Extended Bold", "Inter", sans-serif;
  letter-spacing: 0.02em;
}

.usage-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #f2f2f4;
  color: #111315;
}

@media (min-width: 768px) {
  .usage-table th,
  .usage-table td {
    padding: 1rem;
  }
}

.usage-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.usage-table tbody tr:nth-child(even) {
  background: #f8f8fa;
}

.history-empty {
  margin-top: 2rem;
  text-align: center;
  color: var(--fgs-muted);
  padding: 1rem;
}

.history-date-desktop {
  white-space: nowrap;
}

.history-date-mobile {
  display: none;
  font-size: 0.85rem;
  color: var(--fgs-muted);
  margin-top: 0.15rem;
}

.country-cell {
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .summary-info {
    padding: 0;
  }
  .summary-field {
    gap: 0.2rem;
  }

  .usage-table th.history-date-desktop,
  .usage-table td.history-date-desktop {
    display: none;
  }

  .history-date-mobile {
    display: block;
  }
}
