/* ============================================
   /order: the hand-written parts. Layout is Tailwind; this file holds the choice
   rows, the step line, the domain input and the phone's bottom bar. Colours come
   from the .hz tokens in hosting.css, which this page also loads.
   ============================================ */

.od-card {
    background: var(--hz-card);
    border: 1px solid var(--hz-line);
    border-radius: 1rem;
    padding: 1.1rem;
}
@media (min-width: 640px) { .od-card { padding: 1.5rem; } }

.od-h { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.05rem; color: var(--hz-text); }
.od-num {
    display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex-shrink: 0;
    border-radius: 999px; background: var(--hz-green); color: #fff; font-size: 0.8rem; font-weight: 800;
}

/* Steps: three on this page, the fourth greyed because it happens on my.get.bd. */
.od-steps { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.8rem; font-weight: 600; color: var(--hz-text); }
.od-steps li { display: inline-flex; align-items: center; gap: 0.4rem; }
.od-steps li span {
    display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 999px;
    background: var(--hz-green); color: #fff; font-size: 0.7rem; font-weight: 800;
}
.od-steps li + li::before { content: ''; width: 1rem; height: 1px; background: var(--hz-line); margin-right: 0.4rem; }
.od-steps .od-steps-away { color: var(--hz-muted); }
.od-steps .od-steps-away span { background: transparent; color: var(--hz-muted); box-shadow: 0 0 0 1px var(--hz-line) inset; }
/* On a phone the row wrapped, leaving the last step alone on a second line behind a stray
   connector. There, each step is an equal column with its label under the number, so all
   of them stay on one line and the connectors run between the numbers. */
@media (max-width: 639.98px) {
    .od-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; font-size: 0.75rem; line-height: 1.25; }
    .od-steps li { position: relative; flex-direction: column; gap: 0.35rem; padding: 0 0.15rem; text-align: center; }
    .od-steps li + li::before { position: absolute; top: 0.625rem; left: calc(-50% + 1rem); right: calc(50% + 1rem); width: auto; margin: 0; }
}

/* A choice row: the whole row is the label, so the target is large on a phone. */
.od-choice {
    display: flex; align-items: center; gap: 0.75rem; cursor: pointer;
    padding: 0.8rem 0.9rem; border: 1px solid var(--hz-line); border-radius: 0.8rem;
    background: var(--hz-card); transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.od-choice:hover { border-color: var(--hz-green-2); }
.od-choice input[type="radio"] { width: 1.1rem; height: 1.1rem; flex-shrink: 0; accent-color: var(--hz-green); }
.od-choice:has(input:checked) { border-color: var(--hz-green); box-shadow: 0 0 0 1px var(--hz-green) inset; background: rgba(0, 106, 78, 0.04); }
.dark .od-choice:has(input:checked) { border-color: var(--hz-green-2); box-shadow: 0 0 0 1px var(--hz-green-2) inset; background: rgba(52, 211, 153, 0.06); }
.od-choice:has(input:focus-visible) { outline: 2px solid var(--hz-green-2); outline-offset: 2px; }

/* What opens under a domain choice. */
.od-sub { margin: 0.25rem 0 0.5rem; padding: 0.9rem; border-radius: 0.8rem; background: var(--hz-soft); }

.od-domain-input {
    display: flex; align-items: stretch; border: 1px solid var(--hz-line); border-radius: 0.7rem;
    background: var(--hz-card); overflow: hidden;
}
.od-domain-input:focus-within { border-color: var(--hz-green); box-shadow: 0 0 0 1px var(--hz-green) inset; }
.od-domain-input input {
    flex: 1; min-width: 0; padding: 0.7rem 0.8rem; border: 0; background: transparent;
    color: var(--hz-text); font-size: 1rem; outline: none;
}
.od-domain-input input:focus { box-shadow: none; }
.od-domain-input select {
    border: 0; border-left: 1px solid var(--hz-line); background-color: var(--hz-soft);
    color: var(--hz-text); font-weight: 700; font-size: 0.875rem; padding: 0 2rem 0 0.7rem; outline: none;
}
.od-select {
    border: 1px solid var(--hz-line); border-radius: 0.5rem; background-color: var(--hz-card);
    color: var(--hz-text); font-size: 0.8rem; padding: 0.3rem 2rem 0.3rem 0.6rem;
}

/* No display here: the markup sets it, so Tailwind can hide a button per screen size. */
.od-btn, .od-btn-ghost {
    align-items: center; justify-content: center; gap: 0.4rem;
    font-weight: 700; font-size: 0.9rem; border-radius: 0.75rem; transition: background-color 0.15s, opacity 0.15s;
}
.od-btn { padding: 0.85rem 1.2rem; background: var(--hz-green); color: #fff; }
.od-btn:hover { background: #00563f; }
.od-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.od-btn-ghost { display: inline-flex; padding-left: 1rem; padding-right: 1rem; border: 1px solid var(--hz-green); color: var(--hz-green); background: var(--hz-card); }
.dark .od-btn-ghost { border-color: var(--hz-green-2); color: var(--hz-green-2); }
.od-btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; }

.od-pill {
    font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px;
    border: 1px solid var(--hz-line); color: var(--hz-text); background: var(--hz-card);
}
.od-pill:hover { border-color: var(--hz-green); color: var(--hz-green); }

.od-code-tag {
    display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.3rem;
    font-size: 0.7rem; font-weight: 700; color: var(--hz-green);
}
.dark .od-code-tag { color: var(--hz-green-2); }

.od-next { list-style: decimal; padding-left: 1.1rem; }
/* Bengali numerals on Bengali pages: the markers are drawn by CSS, not written in the copy. */
:lang(bn) .od-next { list-style-type: bengali; }
.od-next li + li { margin-top: 0.25rem; }

/* The phone's bottom bar: the total and the button, always in reach. */
.od-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    background: var(--hz-card); border-top: 1px solid var(--hz-line);
    box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, 0.25);
}
.od-bar .od-btn { padding: 0.75rem 1.1rem; }
/* The chat button (AnyChat's #arcontactus, fixed 20px from the bottom right, above
   everything) sat on "Continue to checkout". Wherever the bar shows, the button rises
   to sit just above it: the bar is 4.3rem tall plus the iPhone's home-bar inset, in
   both languages, so the gap stays 0.75rem. Chat stays one tap away during checkout. */
@media (max-width: 1023.98px) {
    #arcontactus { bottom: calc(4.3rem + env(safe-area-inset-bottom, 0px) + 0.75rem) !important; }
}

/* The chosen plan, with the full list folded under it. */
.od-plans > summary { list-style: none; }
.od-plans > summary::-webkit-details-marker { display: none; }
.od-chosen { border-color: var(--hz-green); box-shadow: 0 0 0 1px var(--hz-green) inset; background: rgba(0, 106, 78, 0.04); }
.dark .od-chosen { border-color: var(--hz-green-2); box-shadow: 0 0 0 1px var(--hz-green-2) inset; background: rgba(52, 211, 153, 0.06); }
.od-change {
    flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--hz-green);
    padding: 0.3rem 0.65rem; border: 1px solid currentColor; border-radius: 999px;
}
.dark .od-change { color: var(--hz-green-2); }
.od-plans[open] .od-change { background: var(--hz-green); border-color: var(--hz-green); color: #fff; }

/* A VPS's operating system: a tile per family, then that family's version list. Where
   :has() works, only the chosen family's list shows (order.php writes one rule per
   family); an older browser shows every list, each labelled with its family. */
.od-os-tile { padding: 0.65rem 0.75rem; gap: 0.55rem; }
/* Two across on a phone: an odd last tile takes the whole row rather than sit alone. */
@media (max-width: 639.98px) { .od-os-tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@supports selector(:has(*)) { .od-os-ver { display: none; } }
.od-os-ver { max-width: 32rem; }
.od-select-wide { display: block; width: 100%; font-size: 0.9rem; font-weight: 600; padding: 0.6rem 2rem 0.6rem 0.75rem; border-radius: 0.7rem; }
.od-key {
    display: block; width: 100%; padding: 0.6rem 0.75rem; resize: vertical; word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem;
    color: var(--hz-text); background: var(--hz-card); border: 1px solid var(--hz-line); border-radius: 0.7rem;
}
.od-key:focus { outline: none; border-color: var(--hz-green); box-shadow: 0 0 0 1px var(--hz-green) inset; }

/* Further plan families on the domain-first page, folded until wanted. */
.od-more > summary {
    cursor: pointer; list-style: none; font-size: 0.85rem; font-weight: 700; color: var(--hz-green);
    padding: 0.6rem 0.9rem; border: 1px dashed var(--hz-line); border-radius: 0.8rem;
}
.od-more > summary::-webkit-details-marker { display: none; }
.od-more > summary::after { content: ' +'; }
.od-more[open] > summary::after { content: ' −'; }
.dark .od-more > summary { color: var(--hz-green-2); }
