/* Progressive enhancement: without JS all native fields, links and actions remain. */
.th-body .th-portal-toggle { display:none; }
.th-body .th-portal-links { display:flex;align-items:center;gap:.35rem; }
.th-body .th-portal-links[hidden] { display:none!important; }
.th-body .th-mobile-configbar { display:none; }
.th-body .th-mobile-configbar[hidden] { display:none!important; }

body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-primary-column { gap:14px; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-primary-column > .th-checkout-card { margin:0;padding:20px; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-primary-column .th-checkout-card .th-checkout-card { margin:0;padding:0;border:0;background:none; }
body.th-modern-checkout #frmCheckout.th-checkout-compact #containerExistingAccountSelect.th-account-chooser {
    margin:0;padding:0;border:0;border-radius:0;background:transparent;gap:10px;
}
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-account-chooser-help { display:none; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-account-chooser .account,
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-account-chooser .account label { min-height:76px; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-account-chooser .account label { padding:12px;gap:10px; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-account-chooser .address strong { white-space:normal;overflow-wrap:anywhere; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-account-chooser .account:hover { transform:none; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .sub-heading { margin-bottom:14px!important; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes { margin:0;padding:0!important;overflow:hidden; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes > summary {
    display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;
    padding:16px 20px;cursor:pointer;list-style:none;color:var(--order-text,#eef1f5);font-size:14px;font-weight:600;
}
.th-body .th-checkout-notes > summary::-webkit-details-marker { display:none; }
.th-body .th-checkout-notes > summary::after {
    content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
    transform:rotate(45deg);flex:none;transition:transform .15s;
}
.th-body .th-checkout-notes[open] > summary::after { transform:rotate(225deg); }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes-body { padding:0 20px 16px; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes-body .form-group { margin:0; }
body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes-body textarea { min-height:96px;resize:vertical; }

@media (max-width:767.98px) {
    .th-body .th-portal-nav[data-th-mobile-nav] { overflow:visible; }
    .th-body .th-portal-nav[data-th-mobile-nav] > .container { display:block;min-width:0;padding-top:8px;padding-bottom:8px; }
    .th-body .th-portal-toggle {
        display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:10px 14px;
        border:1px solid var(--th-border,#30343a);border-radius:10px;background:#15191e;color:#eef1f5;
        text-align:left;font:inherit;font-size:14px;cursor:pointer;
    }
    .th-body .th-portal-toggle-label { color:#b7c0cb;font-size:12px; }
    .th-body .th-portal-toggle-current { flex:1;min-width:0;font-weight:600;overflow-wrap:anywhere; }
    .th-body .th-portal-toggle::after {
        content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
        transform:rotate(45deg);flex:none;margin:0 2px 4px 8px;
    }
    .th-body .th-portal-toggle[aria-expanded=true]::after { transform:rotate(225deg);margin-top:6px; }
    .th-body .th-portal-links {
        display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px 0 2px;
        max-height:calc(100dvh - 180px);overflow-y:auto;overscroll-behavior:contain;
    }
    .th-body .th-portal-nav .th-portal-links a { min-width:0;min-height:48px;margin:0;padding:12px;border-radius:8px;white-space:normal;line-height:1.4; }
    .th-body .th-portal-links a.active { background:rgba(255,101,0,.12); }
    .th-body .th-portal-links a::after { display:none; }

    .th-body.th-has-mobile-configbar[data-th-configbar-visible=true] { padding-bottom:var(--th-configbar-height,100px); }
    .th-body .th-mobile-configbar {
        position:fixed;inset:auto 0 0;z-index:1020;display:flex;align-items:center;justify-content:space-between;
        gap:12px;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
        border-top:1px solid #34383e;background:#11151a;color:#eef1f5;box-shadow:0 -6px 24px rgba(0,0,0,.2);
    }
    .th-body .th-mobile-configbar-copy { min-width:0;display:grid;gap:2px; }
    .th-body .th-mobile-configbar-label { color:#b7c0cb;font-size:12px;line-height:1.4; }
    .th-body .th-mobile-configbar-price { color:#fff;font-size:20px;font-weight:700;line-height:1.3;overflow-wrap:anywhere; }
    .th-body .th-mobile-configbar-overview { color:#cbd3dd;font-size:12px;text-decoration:underline;text-underline-offset:3px; }
    .th-body .th-mobile-configbar .th-mobile-configbar-action {
        display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:46px;max-width:52%;
        padding:12px 20px;border:0;border-radius:10px;background:#ff6500;color:#111;font:inherit;font-size:14px;font-weight:600;line-height:1.4;
    }
    .th-body .th-mobile-configbar .th-mobile-configbar-action:disabled { cursor:wait;opacity:.6; }
    .th-body.th-has-mobile-configbar[data-th-configbar-visible=true] .th-back-to-top { bottom:calc(var(--th-configbar-height,100px) + 12px); }
    body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-primary-column > .th-checkout-card { padding:16px; }
    body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes > summary { padding:16px; }
    body.th-modern-checkout #frmCheckout.th-checkout-compact .th-checkout-notes-body { padding:0 16px 16px; }
    /* Long product names, hostnames and totals must wrap, not be clipped by the page. */
    body.th-body #order-standard_cart .view-cart-items .item :is(.item-title,.item-group,.item-domain,small),
    body.th-body #order-standard_cart #frmConfigureProduct :is(.th-config-summary-line,.th-config-summary-total-row,.th-config-summary-due),
    body.th-body #order-standard_cart #frmCheckout #totalDueToday { min-width:0;overflow-wrap:anywhere; }
    body.th-body #order-standard_cart #frmConfigureProduct .th-billing-cycle[data-th-choice-card] { flex-wrap:wrap; }
    body.th-body #order-standard_cart #frmConfigureProduct .th-billing-cycle[data-th-choice-card] .th-billing-cycle-copy { flex:1 1 110px;overflow-wrap:anywhere; }
    body.th-body #order-standard_cart #frmConfigureProduct .th-billing-saving { max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.4; }
    body.th-body #order-standard_cart #frmConfigureProduct .th-os-family > span:not(.th-os-family-icon) { min-width:0;overflow-wrap:anywhere; }
    body.th-body #order-standard_cart #frmConfigureProduct .th-password-meta { flex-wrap:wrap; }
    body.th-body #order-standard_cart #frmCheckout #totalDueToday { flex-wrap:wrap;align-items:center;gap:8px 16px; }
    body.th-body #order-standard_cart #frmCheckout #totalDueToday strong { max-width:100%;margin-left:auto;overflow-wrap:anywhere; }
}
@media print {
    .th-body .th-mobile-configbar,.th-body .th-portal-toggle { display:none!important; }
    .th-body.th-has-mobile-configbar { padding-bottom:0; }
}
@media (prefers-reduced-motion:reduce) {
    .th-body .th-checkout-notes > summary::after { transition:none; }
}
