/* ── titanium-weight-calculator · HonTitan Custom Widgets ── */

/* ── Widget wrapper ─────────────────────────────────────── */
.ht-wc {
    font-family: inherit; /* Poppins inherits site-wide */
}

/* ── Section header ─────────────────────────────────────── */
.ht-wc__header {
    text-align: center;
    margin-bottom: 32px;
}

.ht-wc__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #002699;
    margin-bottom: 12px;
}

.ht-wc__heading {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.3;
    color: #000000;
    margin: 0 0 12px;
}

.ht-wc__desc {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: #727579;
    max-width: 580px;
    margin: 0 auto;
}

/* ── Card ───────────────────────────────────────────────── */
.ht-wc__card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.13);
    overflow: hidden;
}

/* ── Shape tabs ─────────────────────────────────────────── */
.ht-wc__tabs {
    display: flex;
    background: #F5F7FB;
    border-bottom: 1px solid #CECECE;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ht-wc__tabs::-webkit-scrollbar { display: none; }

.ht-wc__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 16px;
    min-width: 92px;
    cursor: pointer;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    color: #727579;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ht-wc__tab:hover {
    color: #000000;
    background: rgba(0, 38, 153, 0.04);
}

.ht-wc__tab--active {
    color: #002699;
    border-bottom-color: #002699;
    font-weight: 600;
    background: #ffffff;
}

.ht-wc__tab:focus-visible {
    outline: 2px solid #002699;
    outline-offset: -2px;
}

/* ── Body grid ──────────────────────────────────────────── */
.ht-wc__body {
    padding: 28px 32px;
}

.ht-wc__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Inputs column ──────────────────────────────────────── */
.ht-wc__inputs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ht-wc__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ht-wc__shape-fields {
    display: contents; /* children participate in flex directly */
}

/* Shape fields rendered inside shape-fields div need gap */
.ht-wc__shape-fields .ht-wc__row,
.ht-wc__shape-fields .ht-wc__field {
    /* already in flex column gap via .ht-wc__inputs */
}

.ht-wc__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ht-wc__field--hidden { display: none; }

.ht-wc__label {
    font-size: 13px;
    font-weight: 600;
    color: #727579;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ht-wc__label-opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
}

.ht-wc__input-wrap {
    position: relative;
}

.ht-wc__input {
    width: 100%;
    padding: 10px 48px 10px 12px;
    border: 1px solid #CECECE;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    color: #000000;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}

.ht-wc__input::-webkit-outer-spin-button,
.ht-wc__input::-webkit-inner-spin-button { -webkit-appearance: none; }

.ht-wc__input::placeholder { color: #CECECE; }

.ht-wc__input:focus {
    outline: none;
    border-color: #002699;
    box-shadow: 0 0 0 3px rgba(0, 38, 153, 0.12);
}

.ht-wc__unit {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #727579;
    pointer-events: none;
}

.ht-wc__select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid #CECECE;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    color: #000000;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23727579' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ht-wc__select:focus {
    outline: none;
    border-color: #002699;
    box-shadow: 0 0 0 3px rgba(0, 38, 153, 0.12);
}

.ht-wc__hint {
    font-size: 12px;
    color: #727579;
    margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.ht-wc__btn-calc {
    width: 100%;
    padding: 15px 35px;
    background: #002699;
    color: #ffffff;
    border: 2px solid #002699;
    border-radius: 999px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.45s, color 0.45s, border-color 0.45s;
    margin-top: 4px;
}

.ht-wc__btn-calc:hover,
.ht-wc__btn-calc:focus-visible {
    background: #000000;
    border-color: #000000;
}

.ht-wc__btn-calc:focus-visible {
    outline: 2px solid #002699;
    outline-offset: 3px;
}

.ht-wc__btn-reset {
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    color: #727579;
    border: 1px solid #CECECE;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    margin-top: 6px;
}

.ht-wc__btn-reset:hover {
    border-color: #727579;
    color: #000000;
}

/* ── Results panel ──────────────────────────────────────── */
.ht-wc__results {
    background: #F5F7FB;
    border: 1px solid #CECECE;
    border-radius: 10px;
    overflow: hidden;
}

.ht-wc__results-hd {
    background: #002699;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ht-wc__result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #CECECE;
}

.ht-wc__result-row:last-of-type { border-bottom: none; }

.ht-wc__result-row--hi {
    background: rgba(0, 38, 153, 0.05);
}

.ht-wc__result-row--hidden { display: none; }

.ht-wc__result-lbl {
    font-size: 15px;
    color: #727579;
}

.ht-wc__result-val {
    font-size: 18px;
    font-weight: 600;
    color: #002699;
    font-variant-numeric: tabular-nums;
}

.ht-wc__result-val--ph {
    font-size: 15px;
    font-weight: 400;
    color: #CECECE;
}

.ht-wc__result-val--cost { color: #008000; }

/* ── Formula box ────────────────────────────────────────── */
.ht-wc__formula-box {
    display: none;
    margin: 0 20px 16px;
    background: #ffffff;
    border: 1px solid #CECECE;
    border-left: 3px solid #002699;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
}

.ht-wc__formula-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #002699;
    margin-bottom: 5px;
}

.ht-wc__formula-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #000000;
    line-height: 1.9;
    white-space: pre-line;
}

/* ── Disclaimer ─────────────────────────────────────────── */
.ht-wc__disclaimer {
    margin-top: 16px;
    padding: 12px 16px;
    background: #F5F7FB;
    border: 1px solid #CECECE;
    border-left: 3px solid #727579;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    font-weight: 400;
    color: #727579;
    line-height: 1.6;
}

/* ── TABLET ≤ 1024px ────────────────────────────────────── */
@media (max-width: 1024px) {
    .ht-wc__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ht-wc__body {
        padding: 24px;
    }
}

/* ── MOBILE ≤ 767px ─────────────────────────────────────── */
@media (max-width: 767px) {
    .ht-wc__heading { font-size: 25px; }
    .ht-wc__desc    { font-size: 15px; }

    .ht-wc__body { padding: 18px; }

    .ht-wc__row { grid-template-columns: 1fr; }

    .ht-wc__btn-calc { font-size: 16px; padding: 13px 24px; }

    .ht-wc__result-val { font-size: 16px; }
}

/* ── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ht-wc__tab,
    .ht-wc__btn-calc,
    .ht-wc__btn-reset,
    .ht-wc__input,
    .ht-wc__select { transition: none; }
}
