/* ==========================================================================
   BellTimes.net — NTP server page
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO / SERVER ADDRESS
   -------------------------------------------------------------------------- */

.ntp-hero {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
   gap: 12px;
   margin-bottom: 20px;
}

.ntp-card {
   padding: 20px 22px;
   background: var(--surface);
   border: 1px solid var(--border);
   border-radius: var(--radius);
}

.ntp-card__label {
   display: block;
   margin-bottom: 8px;
   font-size: 0.6rem;
   font-weight: 700;
   letter-spacing: 0.16em;
   text-transform: uppercase;
   color: var(--text-dim);
}

.ntp-card__value {
   display: block;
   font-family: var(--font-mono);
   font-size: 1.05rem;
   color: var(--accent);
   word-break: break-all;
}

.ntp-card__note {
   display: block;
   margin-top: 6px;
   font-size: 0.74rem;
   color: var(--text-muted);
   line-height: 1.55;
}

/* live status dot */
.ntp-status {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   font-size: 0.78rem;
   color: var(--text-muted);
}

.ntp-status__dot {
   width: 9px;
   height: 9px;
   border-radius: 50%;
   background: var(--text-dim);
   flex-shrink: 0;
}
.ntp-status.is-online .ntp-status__dot {
   background: var(--ok);
   box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16);
}
.ntp-status.is-offline .ntp-status__dot {
   background: var(--danger);
   box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.16);
}

/* --------------------------------------------------------------------------
   TABS
   -------------------------------------------------------------------------- */

.ntp-tabs {
   display: flex;
   gap: 4px;
   margin-bottom: 22px;
   padding: 4px;
   background: var(--surface);
   border: 1px solid var(--border);
   border-radius: var(--radius-pill);
   width: fit-content;
   max-width: 100%;
   overflow-x: auto;
}

.ntp-tab {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   height: 38px;
   padding: 0 18px;
   background: transparent;
   border: 0;
   border-radius: var(--radius-pill);
   color: var(--text-muted);
   font-family: var(--font-mono);
   font-size: 0.78rem;
   letter-spacing: 0.04em;
   white-space: nowrap;
   cursor: pointer;
   transition: background 0.18s, color 0.18s;
}
.ntp-tab:hover { color: var(--text); }
.ntp-tab[aria-selected="true"] {
   background: var(--accent);
   color: var(--accent-contrast);
   font-weight: 700;
}

.ntp-panel[hidden] { display: none; }

/* --------------------------------------------------------------------------
   STEPS
   -------------------------------------------------------------------------- */

.ntp-steps {
   display: grid;
   gap: 10px;
   counter-reset: ntp-step;
}

.ntp-step {
   display: flex;
   gap: 16px;
   align-items: flex-start;
   padding: 18px 20px;
   background: var(--surface);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   /* Without this the step's content can push the card wider than the
      viewport on narrow screens. */
   min-width: 0;
   max-width: 100%;
}
.ntp-step::before {
   counter-increment: ntp-step;
   content: counter(ntp-step);
   display: flex;
   align-items: center;
   justify-content: center;
   width: 26px;
   height: 26px;
   flex-shrink: 0;
   background: var(--accent-soft);
   border: 1px solid var(--accent-line);
   border-radius: 50%;
   color: var(--accent);
   font-family: var(--font-mono);
   font-size: 0.75rem;
   font-weight: 700;
}

.ntp-step__body {
   min-width: 0;
   flex: 1 1 auto;
   width: 100%;
}

/* Long commands and file names must be allowed to wrap or they push the
   layout sideways on narrow screens. */
.ntp-step__body,
.ntp-step__desc,
.ntp-step__title,
.ntp-linux__body {
   min-width: 0;
   overflow-wrap: break-word;
   word-break: break-word;
}

.ntp-step__title {
   display: block;
   font-size: 0.92rem;
   font-weight: 700;
   color: var(--text);
   margin-bottom: 4px;
}

.ntp-step__desc {
   display: block;
   font-size: 0.83rem;
   color: var(--text-muted);
   line-height: 1.7;
}

.ntp-step__desc code,
.ntp-inline-code {
   padding: 1px 6px;
   background: var(--surface-3);
   border: 1px solid var(--border);
   border-radius: 4px;
   font-family: var(--font-mono);
   font-size: 0.85em;
   color: var(--accent);
   overflow-wrap: break-word;
   word-break: break-word;
}

/* --------------------------------------------------------------------------
   CODE BLOCKS
   -------------------------------------------------------------------------- */

.ntp-code {
   position: relative;
   margin: 12px 0 0;
   padding: 15px 17px;
   background: var(--bg);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   font-family: var(--font-mono);
   font-size: 0.8rem;
   line-height: 1.7;
   color: var(--text);
   overflow-x: auto;
   max-width: 100%;
   white-space: pre;
   -webkit-overflow-scrolling: touch;
}
.ntp-code span { display: inline; }
.ntp-code .cmt { color: var(--text-dim); }
.ntp-code .cmd { color: var(--text); }
.ntp-code .hl  { color: var(--accent); }

.ntp-code__copy {
   position: absolute;
   top: 8px;
   right: 8px;
   height: 26px;
   padding: 0 10px;
   background: var(--surface-2);
   border: 1px solid var(--border-strong);
   border-radius: var(--radius-pill);
   color: var(--text-dim);
   font-family: var(--font-mono);
   font-size: 0.66rem;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   cursor: pointer;
   opacity: 0;
   transition: opacity 0.18s, color 0.18s, border-color 0.18s;
}
.ntp-code:hover .ntp-code__copy,
.ntp-code__copy:focus-visible { opacity: 1; }
.ntp-code__copy:hover {
   color: var(--accent);
   border-color: var(--accent-line);
}

/* --------------------------------------------------------------------------
   LINUX — deliberately brief
   -------------------------------------------------------------------------- */

.ntp-linux {
   padding: 22px 24px;
   background: var(--surface);
   border: 1px solid var(--border);
   border-left: 3px solid var(--accent);
   border-radius: var(--radius);
}

.ntp-linux__title {
   margin: 0 0 8px;
   font-family: var(--font-display);
   font-size: 1rem;
   font-weight: 700;
   color: var(--text);
}

.ntp-linux__body {
   margin: 0;
   font-size: 0.85rem;
   color: var(--text-muted);
   line-height: 1.75;
}

.ntp-linux__body a {
   color: var(--accent);
   text-decoration: none;
   border-bottom: 1px solid var(--accent-line);
}
.ntp-linux__body a:hover { border-bottom-color: var(--accent); }

/* --------------------------------------------------------------------------
   TIME CHECKER
   -------------------------------------------------------------------------- */

.ntp-checker {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
   gap: 12px;
}

.ntp-readout {
   padding: 18px 20px;
   background: var(--surface);
   border: 1px solid var(--border);
   border-radius: var(--radius);
}

.ntp-readout__label {
   display: block;
   font-size: 0.6rem;
   font-weight: 700;
   letter-spacing: 0.16em;
   text-transform: uppercase;
   color: var(--text-dim);
   margin-bottom: 8px;
}

.ntp-readout__value {
   display: block;
   font-family: var(--font-mono);
   font-size: 1.15rem;
   font-variant-numeric: tabular-nums;
   color: var(--text);
}

.ntp-readout__value.is-good { color: var(--ok); }
.ntp-readout__value.is-off  { color: var(--danger); }
.ntp-readout__sub {
   display: block;
   margin-top: 5px;
   font-size: 0.72rem;
   color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.ntp-faq {
   display: grid;
   gap: 8px;
}

.ntp-faq__item {
   background: var(--surface);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   overflow: hidden;
}

.ntp-faq__q {
   width: 100%;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 14px;
   padding: 15px 18px;
   background: none;
   border: 0;
   color: var(--text);
   font-family: var(--font-mono);
   font-size: 0.87rem;
   text-align: left;
   cursor: pointer;
   transition: background 0.16s;
}
.ntp-faq__q:hover { background: var(--surface-2); }

.ntp-faq__q::after {
   content: '+';
   flex-shrink: 0;
   color: var(--text-dim);
   font-size: 1.1rem;
   line-height: 1;
   transition: transform 0.22s var(--ease);
}
.ntp-faq__item.is-open .ntp-faq__q::after { transform: rotate(45deg); }

.ntp-faq__a {
   padding: 0 18px;
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.28s var(--ease), padding 0.28s var(--ease);
}
.ntp-faq__item.is-open .ntp-faq__a {
   max-height: 340px;
   padding: 0 18px 16px;
}
.ntp-faq__a p {
   margin: 0;
   font-size: 0.83rem;
   color: var(--text-muted);
   line-height: 1.75;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
   .ntp-tabs { width: 100%; justify-content: flex-start; }
   .ntp-tab { padding: 0 14px; font-size: 0.74rem; }
   .ntp-code { font-size: 0.74rem; padding: 13px 14px; }
   .ntp-code__copy { opacity: 1; }
}
