/* ==========================================================================
   USBoxesCo — Free tools (Box Size Calculator)
   Sirf tools pages pe load hoti hai. Classes ".ubt-" se shuru hoti hain.
   Theme html font-size 62.5% rakhta hai, isliye sizes px mein hain.
   Theme har <p> pe "font-size: 1.6rem !important" lagata hai aur radio/checkbox ka appearance hata deta hai,
   isliye p sizes !important ke saath hain aur options <button> se bane hain (radio nahi).
   ========================================================================== */

.ubt {
    --ubt-orange: #ff6600;
    --ubt-orange-dark: #e05a00;
    --ubt-orange-soft: #fff1e8;
    --ubt-orange-line: #ffd9bf;
    --ubt-navy: #0f172a;
    --ubt-ink: #111827;
    --ubt-text: #374151;
    --ubt-muted: #6b7280;
    --ubt-line: #e5e7eb;
    --ubt-soft: #f6f7fb;
    --ubt-green: #16a34a;
    --ubt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
    --ubt-shadow-lg: 0 20px 48px rgba(16, 24, 40, .12);

    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ubt-text);
    background: var(--ubt-soft);
}
.ubt *, .ubt *::before, .ubt *::after { box-sizing: border-box; }
.ubt a { text-decoration: none; }
.ubt-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.ubt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.ubt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
    border-radius: 12px; border: 2px solid transparent; cursor: pointer; text-decoration: none !important;
    font: 700 14px/1 'Poppins', sans-serif; letter-spacing: .04em; text-transform: uppercase;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.ubt-btn:hover { transform: translateY(-1px); }
.ubt-btn svg { width: 18px; height: 18px; flex: none; }
.ubt-btn--primary { background: var(--ubt-orange); color: #fff !important; box-shadow: 0 10px 24px rgba(255, 102, 0, .28); }
.ubt-btn--primary:hover { background: var(--ubt-orange-dark); }
.ubt-btn--ghost { background: #fff; color: var(--ubt-ink) !important; border-color: var(--ubt-line); }
.ubt-btn--ghost:hover { border-color: var(--ubt-orange); color: var(--ubt-orange) !important; }
.ubt-btn--block { width: 100%; }
.ubt-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }

/* ---------- Hero ---------- */
.ubt-hero { background: var(--ubt-navy); color: #cbd5e1; padding: 40px 0 104px; position: relative; overflow: hidden; }
.ubt-hero::before {
    content: ""; position: absolute; width: 560px; height: 560px; right: -160px; top: -260px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 102, 0, .35), transparent);
}
.ubt-hero > * { position: relative; }
.ubt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; font-size: 13px; }
.ubt-crumbs li { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; }
.ubt-crumbs li + li::before { content: "›"; color: #64748b; }
.ubt-crumbs a { color: #94a3b8 !important; }
.ubt-crumbs a:hover { color: #fff !important; }
.ubt-crumbs [aria-current] { color: #fff; }
.ubt-badge { display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 102, 0, .16); color: #ffb380; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ubt-hero h1 { font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: #fff; margin: 0 0 10px; }
.ubt-hero h1 span { color: var(--ubt-orange); }
.ubt .ubt-hero__lead { font-size: 16px !important; color: #94a3b8; margin: 0; max-width: 640px; line-height: 1.6; }

/* ---------- Calculator layout ---------- */
.ubt-main { margin-top: -64px; padding-bottom: 56px; position: relative; z-index: 1; }
.ubt-calc { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.ubt-card { background: #fff; border: 1px solid var(--ubt-line); border-radius: 20px; box-shadow: var(--ubt-shadow-lg); padding: 28px; min-width: 0; }

.ubt-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.ubt-step + .ubt-step { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--ubt-line); }
.ubt-step__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--ubt-ink); }
.ubt-step__num { width: 28px; height: 28px; border-radius: 50%; background: var(--ubt-orange-soft); color: var(--ubt-orange); display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.ubt-step__title small { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--ubt-muted); }

.ubt-row { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ubt-row + .ubt-row { margin-top: 12px; }
.ubt-field { min-width: 0; }
.ubt-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ubt-ink); margin-bottom: 6px; }
.ubt-input { position: relative; }
.ubt .ubt-input input {
    width: 100%; height: 50px; margin: 0; padding: 0 44px 0 14px; border-radius: 10px;
    font: 500 16px/1.2 'Poppins', sans-serif; color: var(--ubt-ink);
    background: var(--ubt-soft); border: 1px solid var(--ubt-line); box-shadow: none; transition: border-color .2s, box-shadow .2s, background .2s;
    -moz-appearance: textfield;
}
.ubt .ubt-input input::-webkit-outer-spin-button, .ubt .ubt-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ubt .ubt-input input:focus { outline: none; background: #fff; border-color: var(--ubt-orange); box-shadow: 0 0 0 4px rgba(255, 102, 0, .12); }
.ubt-input__unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--ubt-muted); pointer-events: none; }
.ubt-field.has-error input { border-color: #dc2626; background: #fff; }
.ubt-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--ubt-muted); }

/* Segmented choices (buttons) */
.ubt-seg { display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ubt-seg button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 10px 12px; margin: 0;
    border-radius: 12px; border: 1.5px solid var(--ubt-line); background: #fff; cursor: pointer; text-align: left;
    font: 600 14px/1.25 'Poppins', sans-serif; color: var(--ubt-ink); transition: border-color .2s, background .2s, box-shadow .2s;
}
.ubt-seg button small { font-size: 11.5px; font-weight: 400; color: var(--ubt-muted); line-height: 1.35; }
.ubt-seg button:hover { border-color: var(--ubt-orange-line); }
.ubt-seg button[aria-pressed="true"] { border-color: var(--ubt-orange); background: var(--ubt-orange-soft); box-shadow: 0 0 0 3px rgba(255, 102, 0, .10); }
.ubt-seg button:focus-visible { outline: 2px solid var(--ubt-orange); outline-offset: 2px; }
.ubt-seg--unit { --cols: 2; max-width: 220px; }
.ubt-seg--unit button { min-height: 40px; align-items: center; text-align: center; padding: 8px 12px; }

/* ---------- Result card ---------- */
.ubt-result { position: sticky; top: 100px; }
.ubt-result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ubt-result__head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ubt-ink); }
.ubt-result__head span { font-size: 12px; font-weight: 600; color: var(--ubt-muted); }
.ubt-diagram { display: block; width: 100%; height: auto; max-height: 210px; margin: 0 auto 6px; }
.ubt-diagram text { font: 600 13px 'Poppins', sans-serif; fill: var(--ubt-ink); }
.ubt-size { text-align: center; padding: 14px 12px; border-radius: 14px; background: var(--ubt-navy); color: #fff; }
.ubt-size__label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.ubt-size__value { display: block; margin-top: 4px; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ubt-size__value b { color: var(--ubt-orange); font-weight: 700; }
.ubt-size__dec { display: block; margin-top: 4px; font-size: 12px; color: #94a3b8; }
.ubt-lines { list-style: none; margin: 14px 0 0; padding: 0; }
.ubt-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ubt-line); font-size: 13.5px; }
.ubt-lines li span:first-child { color: var(--ubt-muted); }
.ubt-lines li span:last-child { font-weight: 600; color: var(--ubt-ink); text-align: right; }
.ubt .ubt-note { margin: 10px 0 0; font-size: 12px !important; line-height: 1.5; color: var(--ubt-muted); }
.ubt-styles { margin-top: 16px; }
.ubt-styles h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ubt-ink); }
.ubt-styles ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ubt-styles a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px;
    background: var(--ubt-soft); border: 1px solid var(--ubt-line); color: var(--ubt-ink) !important; font-size: 14px; font-weight: 600; transition: border-color .2s;
}
.ubt-styles a small { display: block; font-size: 12px; font-weight: 400; color: var(--ubt-muted); }
.ubt-styles a svg { width: 16px; height: 16px; color: var(--ubt-orange); flex: none; }
.ubt-styles a:hover { border-color: var(--ubt-orange); }
.ubt-warn { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12.5px; line-height: 1.5; }
.ubt-actions { display: grid; gap: 10px; margin-top: 18px; }
.ubt-empty { padding: 18px 12px; border-radius: 14px; background: var(--ubt-soft); border: 1px dashed var(--ubt-line); color: var(--ubt-muted); font-size: 14px; text-align: center; }
.ubt-result.is-empty [data-ubt-filled] { display: none; }
.ubt-result:not(.is-empty) [data-ubt-empty] { display: none; }

/* ---------- Guide ---------- */
.ubt-guide { padding: 24px 0 72px; }
.ubt-guide__inner { max-width: 860px; margin: 0 auto; }
.ubt-guide h2 { margin: 36px 0 12px; font-size: 26px; line-height: 1.3; font-weight: 700; color: var(--ubt-ink); }
.ubt-guide h2:first-child { margin-top: 0; }
.ubt .ubt-guide p { margin: 0 0 14px; font-size: 16px !important; line-height: 1.75; color: var(--ubt-text); }
.ubt-guide ol, .ubt-guide ul { margin: 0 0 16px; padding-left: 22px; font-size: 16px; line-height: 1.75; }
.ubt-guide li { margin-bottom: 6px; }
.ubt-guide strong { color: var(--ubt-ink); }
.ubt-guide a { color: var(--ubt-orange) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.ubt-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 14.5px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--ubt-line); }
.ubt-table th, .ubt-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--ubt-line); }
.ubt-table th { background: var(--ubt-soft); font-weight: 700; color: var(--ubt-ink); }
.ubt-table tr:last-child td { border-bottom: 0; }
.ubt-table-wrap { overflow-x: auto; }
.ubt-faq details { background: #fff; border: 1px solid var(--ubt-line); border-radius: 14px; margin-bottom: 10px; }
.ubt-faq details[open] { border-color: var(--ubt-orange); }
.ubt-faq summary { list-style: none; cursor: pointer; position: relative; padding: 16px 54px 16px 20px; font-size: 16px; font-weight: 600; color: var(--ubt-ink); line-height: 1.45; }
.ubt-faq summary::-webkit-details-marker { display: none; }
.ubt-faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--ubt-orange-soft); color: var(--ubt-orange); display: grid; place-items: center; font-weight: 700; }
.ubt-faq details[open] summary::after { content: "\2212"; }
.ubt .ubt-faq details p { margin: 0; padding: 0 20px 16px; font-size: 15px !important; }
.ubt-cta { margin-top: 36px; padding: 28px; border-radius: 20px; background: var(--ubt-navy); color: #cbd5e1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.ubt-cta h2 { margin: 0 0 4px !important; color: #fff; font-size: 22px; }
.ubt .ubt-cta p { margin: 0; color: #94a3b8; font-size: 15px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
    .ubt-calc { grid-template-columns: minmax(0, 1fr); }
    .ubt-result { position: static; }
}
@media (max-width: 767px) {
    .ubt-container { padding: 0 16px; }
    .ubt-hero { padding: 28px 0 88px; }
    .ubt-hero h1 { font-size: 28px; }
    .ubt .ubt-hero__lead { font-size: 15px !important; }
    .ubt-main { margin-top: -56px; }
    .ubt-card { padding: 18px; border-radius: 16px; }
    .ubt-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .ubt .ubt-input input { padding: 0 30px 0 10px; font-size: 16px; }
    .ubt-input__unit { right: 8px; }
    .ubt-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ubt-seg--unit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ubt-step__title small { display: none; }
    .ubt-size__value { font-size: 22px; }
    .ubt-guide h2 { font-size: 22px; }
    .ubt .ubt-guide p, .ubt-guide ol, .ubt-guide ul { font-size: 15px !important; }
    .ubt-cta { padding: 22px; }
    .ubt-cta .ubt-btn { width: 100%; }
}

/* Mobile result patti */
.ubt-bar {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px;
    border-radius: 14px; background: var(--ubt-navy); color: #fff !important; box-shadow: 0 12px 30px rgba(15, 23, 42, .35);
}
.ubt-bar[hidden] { display: none; }
.ubt-bar small { display: block; font-size: 11px; color: #94a3b8; line-height: 1.2; }
.ubt-bar b { display: block; font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.ubt-bar__go { flex: none; padding: 8px 12px; border-radius: 10px; background: var(--ubt-orange); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
@media (min-width: 1100px) { .ubt-bar { display: none !important; } }
body:has(.ubt-bar:not([hidden])) #scrollTopBtn { bottom: 84px !important; }

/* Guide ke andar buttons: ".ubt-guide a" (orange, underline) button pe na lage */
.ubt-guide a.ubt-btn { text-decoration: none !important; }
.ubt-guide a.ubt-btn--primary, .ubt-guide a.ubt-btn--primary:hover { color: #fff !important; }
.ubt-guide a.ubt-btn--ghost { color: var(--ubt-ink) !important; }

/* ---------- Dimensional weight calculator ---------- */
.ubt-compare { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--ubt-soft); border: 1px solid var(--ubt-line); }
.ubt-compare h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ubt-ink); }
.ubt-compare .ubt-lines { margin-top: 4px; }
.ubt-compare .ubt-lines li:last-child { border-bottom: 0; }
.ubt-save { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--ubt-line); font-size: 13.5px; line-height: 1.55; color: var(--ubt-text); }
.ubt-save.is-good { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.ubt-save strong { color: inherit; }
.ubt .ubt-input input[readonly] { color: var(--ubt-muted); background: #eef0f5; cursor: not-allowed; }
