/* ─────────────────────────────────────────────────────────────
   HubGo — Frontend shipping UI
   Redesigned · Eletro Seg CWB store design system
   ───────────────────────────────────────────────────────────── */

/* ── Container ── */
#hubgo-shipping-calc {
    margin: 12px 0;
}

#hubgo-shipping-calc .hubgo-shipping-calc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

/* ── Ship picker card ── */
#hubgo-response .hubgo-ship-picker,
.woocommerce-cart .hubgo-ship-picker,
.woocommerce-checkout .hubgo-ship-picker {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #fff;
    overflow: visible;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

#hubgo-response .hubgo-ship-picker-trigger,
.woocommerce-cart .hubgo-ship-picker-trigger,
.woocommerce-checkout .hubgo-ship-picker-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}

#hubgo-response .hubgo-ship-picker-trigger:hover,
.woocommerce-cart .hubgo-ship-picker-trigger:hover,
.woocommerce-checkout .hubgo-ship-picker-trigger:hover {
    background: #F8FAFC;
}

#hubgo-response .hubgo-ship-picker-left,
.woocommerce-cart .hubgo-ship-picker-left,
.woocommerce-checkout .hubgo-ship-picker-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

#hubgo-response .hubgo-ship-picker-top,
.woocommerce-cart .hubgo-ship-picker-top,
.woocommerce-checkout .hubgo-ship-picker-top {
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#hubgo-response .hubgo-ship-picker-selected,
.woocommerce-cart .hubgo-ship-picker-selected,
.woocommerce-checkout .hubgo-ship-picker-selected {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hubgo-response .hubgo-ship-picker-sub,
.woocommerce-cart .hubgo-ship-picker-sub,
.woocommerce-checkout .hubgo-ship-picker-sub {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hubgo-response .hubgo-ship-picker-price,
.woocommerce-cart .hubgo-ship-picker-price,
.woocommerce-checkout .hubgo-ship-picker-price {
    color: var(--wd-primary-color, #0B3D91);
    font-weight: 700;
}

#hubgo-response .hubgo-ship-picker-right,
.woocommerce-cart .hubgo-ship-picker-right,
.woocommerce-checkout .hubgo-ship-picker-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#hubgo-response .hubgo-ship-picker-action,
.woocommerce-cart .hubgo-ship-picker-action,
.woocommerce-checkout .hubgo-ship-picker-action {
    font-size: 12px;
    font-weight: 600;
    color: var(--wd-primary-color, #0B3D91);
    white-space: nowrap;
}

#hubgo-response .hubgo-ship-picker-caret,
.woocommerce-cart .hubgo-ship-picker-caret,
.woocommerce-checkout .hubgo-ship-picker-caret {
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
}

/* ── Panel (dropdown with options) ── */
#hubgo-response .hubgo-ship-picker-panel,
.woocommerce-cart .hubgo-ship-picker-panel,
.woocommerce-checkout .hubgo-ship-picker-panel {
    border-top: 1px solid #E5E7EB;
    padding: 12px;
    overflow: visible;
}

/* ── CEP widget inside picker panel ── */
#hubgo-response .hubgo-ship-picker-cep,
.woocommerce-cart .hubgo-ship-picker-cep,
.woocommerce-checkout .hubgo-ship-picker-cep {
    margin-bottom: 10px;
    position: relative;
    overflow: visible;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-widget,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-widget,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-widget {
    width: 100%;
}

#hubgo-response .hubgo-ship-picker-cep-msg,
.woocommerce-cart .hubgo-ship-picker-cep-msg,
.woocommerce-checkout .hubgo-ship-picker-cep-msg {
    font-size: 12.5px;
    font-weight: 600;
    color: #DC2626;
    margin-bottom: 8px;
    line-height: 1.4;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-popover,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-popover,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-popover {
    left: 0;
    right: auto;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-trigger,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-trigger,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-trigger {
    width: 100%;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 10px 12px;
    gap: 8px;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-ico,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-ico,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-ico {
    display: none;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-top,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-top,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-top {
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-bottom,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-bottom,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-bottom {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

#hubgo-response .hubgo-ship-picker-cep .hubgo-cep-chip,
.woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-chip,
.woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #EFF6FF;
    color: var(--wd-primary-color, #0B3D91);
    font-size: 11px;
    font-weight: 700;
}

/* ── Shipping option items ── */
#hubgo-response .hubgo-ship-picker-options,
.woocommerce-cart .hubgo-ship-picker-options,
.woocommerce-checkout .hubgo-ship-picker-options {
    display: grid;
    gap: 6px;
}

#hubgo-response .hubgo-ship-option,
.woocommerce-cart .hubgo-ship-option,
.woocommerce-checkout .hubgo-ship-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s, background 0.15s;
}

#hubgo-response .hubgo-ship-option:hover,
.woocommerce-cart .hubgo-ship-option:hover,
.woocommerce-checkout .hubgo-ship-option:hover {
    background: #F8FAFC;
    border-color: #D1D5DB;
}

#hubgo-response .hubgo-ship-option.is-active,
.woocommerce-cart .hubgo-ship-option.is-active,
.woocommerce-checkout .hubgo-ship-option.is-active {
    border-color: var(--wd-primary-color, #0B3D91);
    background: #EFF6FF;
}

#hubgo-response .hubgo-ship-option-main,
.woocommerce-cart .hubgo-ship-option-main,
.woocommerce-checkout .hubgo-ship-option-main {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hubgo-response .hubgo-ship-option-meta,
.woocommerce-cart .hubgo-ship-option-meta,
.woocommerce-checkout .hubgo-ship-option-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
}

#hubgo-response .hubgo-ship-option-price,
.woocommerce-cart .hubgo-ship-option-price,
.woocommerce-checkout .hubgo-ship-option-price {
    color: var(--wd-primary-color, #0B3D91);
    font-weight: 700;
    white-space: nowrap;
}

/* ── Notes / footer rows ── */
#hubgo-response .hubgo-ship-note {
    border-top: 1px solid #E5E7EB;
    padding: 10px 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #374151;
    font-weight: 500;
}

#hubgo-response .hubgo-ship-foot {
    border-top: 1px solid #E5E7EB;
    padding: 9px 16px;
    font-size: 12px;
    line-height: 1.4;
    color: #9CA3AF;
}

/* ── Loading state — spinner + label, sem skeleton ── */
#hubgo-response .hubgo-loading-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

#hubgo-response .hubgo-loading-head {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
}

#hubgo-response .hubgo-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #E5E7EB;
    border-top-color: var(--wd-primary-color, #0B3D91);
    border-radius: 50%;
    animation: hubgo-spin 0.75s linear infinite;
    flex: 0 0 auto;
}

#hubgo-response .hubgo-loading-text,
#hubgo-response .hubgo-loading-skeleton {
    display: none;
}

/* ── Empty state (sem CEP) ── */
.hubgo-empty-state {
    margin-top: 12px;
}

.hubgo-empty-state[hidden] {
    display: none !important;
}

.hubgo-empty-state-card {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #F8FAFC;
    padding: 18px;
}

.hubgo-empty-state-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: #EFF6FF;
    color: var(--wd-primary-color, #0B3D91);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.hubgo-empty-state-title {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.hubgo-empty-state-text {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #6B7280;
}

.hubgo-empty-state-action {
    margin-top: 14px;
}

.hubgo-empty-state-action .hubgo-cep-widget {
    display: block;
    width: 100%;
}

.hubgo-empty-state-action .hubgo-cep-trigger {
    display: flex;
    justify-content: space-between;
    width: 100%;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    padding: 11px 14px;
}

.hubgo-empty-state-action .hubgo-cep-lines {
    width: 100%;
}

.hubgo-empty-state-action .hubgo-cep-bottom {
    color: #111827;
}

.hubgo-empty-state-action .hubgo-cep-popover {
    left: 0;
    right: auto;
}

.hubgo-empty-state-action .hubgo-cep-popover-inner {
    width: min(360px, calc(100vw - 32px));
}

/* ── CEP widget (global trigger) ── */
.hubgo-cep-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hubgo-cep-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.hubgo-cep-trigger:hover {
    background: #EFF6FF;
    border-color: #D1D5DB;
}

.hubgo-cep-ico {
    color: var(--wd-primary-color, #0B3D91);
    display: inline-flex;
}

.hubgo-cep-lines {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.hubgo-cep-top {
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hubgo-cep-bottom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--wd-primary-color, #0B3D91);
}

.hubgo-cep-caret {
    display: inline-flex;
    opacity: .7;
}

/* ── CEP popover ── */
.hubgo-cep-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 99999;
}

.hubgo-cep-popover-inner {
    position: relative;
    width: min(320px, 92vw);
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    padding: 18px;
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
}

.hubgo-cep-popover-inner:before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #E5E7EB;
    border-top: 1px solid #E5E7EB;
    transform: rotate(45deg);
}

.hubgo-cep-msg {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.45;
    margin-bottom: 12px;
}

.hubgo-cep-label {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.hubgo-cep-inputwrap {
    display: flex;
    align-items: center;
    border: 1px solid #D1D5DB;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.hubgo-cep-inputwrap:focus-within {
    border-color: var(--wd-primary-color, #0B3D91);
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.hubgo-cep-input {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #111827;
}

.hubgo-cep-submit {
    width: 44px;
    height: 40px;
    border-radius: 0;
    border: 0;
    background: var(--wd-primary-color, #0B3D91);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.hubgo-cep-submit:hover {
    background: var(--wd-alternative-color, #1D4ED8);
}

.hubgo-cep-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.hubgo-cep-help {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--wd-link-color, #0B3D91);
    text-decoration: none;
}

.hubgo-cep-help:hover {
    color: var(--wd-link-color-hover, #1D4ED8);
}

.hubgo-cep-error {
    margin-top: 8px;
    font-size: 12px;
    color: #DC2626;
    min-height: 14px;
}

/* ── Ship-card (list layout) ── */
.hubgo-cart-hidden-widget {
    display: none !important;
}

#hubgo-response table {
    display: none !important;
}

.hubgo-ship-card {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.hubgo-ship-card-head {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
    padding: 10px 16px;
    background: #F8FAFC;
    border-bottom: 1px solid #E5E7EB;
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hubgo-ship-card-h1,
.hubgo-ship-card-h2 {
    font-size: inherit;
}

.hubgo-ship-list {
    padding: 0;
}

.hubgo-ship-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #E5E7EB;
}

.hubgo-ship-item:last-child {
    border-bottom: 0;
}

.hubgo-ship-item.is-best {
    background: #F8FAFC;
}

.hubgo-ship-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hubgo-ship-ico {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    flex: 0 0 auto;
}

.hubgo-ship-text {
    min-width: 0;
}

.hubgo-ship-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.hubgo-ship-time {
    font-size: 12px;
    color: #6B7280;
    margin-top: 1px;
}

.hubgo-ship-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--wd-primary-color, #0B3D91);
    white-space: nowrap;
}

.hubgo-ship-note {
    border-top: 1px solid #E5E7EB;
    padding: 10px 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #374151;
    font-weight: 500;
}

.hubgo-ship-foot {
    border-top: 1px solid #E5E7EB;
    padding: 9px 16px;
    font-size: 12px;
    line-height: 1.4;
    color: #9CA3AF;
}

/* ── Compact ship select ── */
#hubgo-response .hubgo-ship-compact {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

#hubgo-response .hubgo-ship-compact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    position: relative;
}

#hubgo-response .hubgo-ship-compact-select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    outline: none;
}

#hubgo-response .hubgo-ship-compact-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--wd-primary-color, #0B3D91);
    white-space: nowrap;
}

#hubgo-response .hubgo-ship-compact-caret {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #9CA3AF;
}

/* ── Cart/checkout specific ── */
.woocommerce-cart select.hubgo-shipping-native-select,
.woocommerce-checkout select.hubgo-shipping-native-select {
    display: none !important;
}

.hubgo-cart-shipping-block {
    margin: 0 0 10px;
}

.hubgo-cart-shipping-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.hubgo-cart-shipping-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.hubgo-cart-shipping-sub {
    font-size: 13px;
    color: #6B7280;
}

.hubgo-cart-shipping-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hubgo-change-cep {
    font-size: 13px;
    font-weight: 600;
    color: var(--wd-primary-color, #0B3D91);
    text-decoration: none;
}

.hubgo-change-cep:hover {
    color: var(--wd-link-color-hover, #1D4ED8);
}

.hubgo-cart-shipping-cep {
    display: none;
}

.hubgo-shipping-list-hidden {
    display: none !important;
}

.hubgo-shipping-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    background: #fff;
    padding: 2px 10px 2px 6px;
    margin: 10px 0;
}

.hubgo-shipping-select {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    outline: none;
    appearance: none;
}

.hubgo-shipping-select-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--wd-primary-color, #0B3D91);
    white-space: nowrap;
}

.hubgo-shipping-select-caret {
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
}

/* ── WooCommerce overrides ── */
.woocommerce-shipping-calculator,
.shipping-calculator-button {
    display: none !important;
}

.woocommerce-shipping-destination,
.woocommerce-shipping-destination strong,
.woocommerce-shipping-destination a {
    display: none !important;
}

.woocommerce-shipping-totals.shipping > th {
    display: none;
}

.woocommerce-shipping-totals.shipping > td {
    padding-left: 0;
}

body.woocommerce-cart,
body.woocommerce-checkout {
    overflow-x: hidden;
}

/* ── Hidden widget ── */
#hubgo-shipping-calc .hubgo-cep-widget--single {
    display: inline-flex;
    align-items: center;
}

#hubgo-shipping-calc .hubgo-form-group-hidden,
#hubgo-shipping-calc .hubgo-postcode-search-hidden {
    display: none;
}

/* ── Postcode form (fallback / legacy) ── */
.hubgo-info-shipping-calc {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 8px;
    display: block;
}

#hubgo-postcode {
    display: inline-block;
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    font-size: 15px;
    color: #111827;
    background-color: #fff;
    border: 1px solid #D1D5DB;
    background-clip: padding-box;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    transition: border-color 0.15s;
}

#hubgo-postcode:focus {
    border-color: var(--wd-primary-color, #0B3D91);
}

#hubgo-postcode::placeholder {
    color: #9CA3AF;
}

.hubgo-form-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    margin-bottom: 8px;
}

.hubgo-form-group > #hubgo-postcode {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.hubgo-form-group > #hubgo-shipping-calc-button {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#hubgo-shipping-calc-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background-color: var(--wd-primary-color, #0B3D91);
    border: 1px solid var(--wd-primary-color, #0B3D91);
    padding: 0 20px;
    border-radius: 8px;
    outline: none;
    transition: background 0.15s;
}

#hubgo-shipping-calc-button:hover {
    background-color: var(--wd-alternative-color, #1D4ED8);
    border-color: var(--wd-alternative-color, #1D4ED8);
}

#hubgo-shipping-calc-button:disabled {
    opacity: .65;
    pointer-events: none;
}

.hubgo-postcode-search {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--wd-link-color, #0B3D91);
    text-decoration: none;
}

.hubgo-postcode-search:hover {
    color: var(--wd-link-color-hover, #1D4ED8);
}

#hubgo-response {
    margin-top: 10px;
}

/* ── Button loader ── */
.hubgo-button-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hubgo-spin 0.7s linear infinite;
    vertical-align: middle;
}

/* ── Animation — somente o spinner ── */
@keyframes hubgo-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 576px) {
    #hubgo-response .hubgo-ship-picker-trigger,
    .woocommerce-cart .hubgo-ship-picker-trigger,
    .woocommerce-checkout .hubgo-ship-picker-trigger {
        padding: 12px;
        gap: 10px;
    }

    #hubgo-response .hubgo-ship-picker-sub,
    .woocommerce-cart .hubgo-ship-picker-sub,
    .woocommerce-checkout .hubgo-ship-picker-sub {
        display: flex;
        flex-wrap: wrap;
        column-gap: 6px;
        row-gap: 2px;
        white-space: normal;
        overflow: visible;
    }

    #hubgo-response .hubgo-ship-picker-sep,
    .woocommerce-cart .hubgo-ship-picker-sep,
    .woocommerce-checkout .hubgo-ship-picker-sep {
        display: none;
    }

    #hubgo-response .hubgo-ship-picker-selected,
    .woocommerce-cart .hubgo-ship-picker-selected,
    .woocommerce-checkout .hubgo-ship-picker-selected {
        font-size: 13px;
    }

    #hubgo-response .hubgo-ship-option,
    .woocommerce-cart .hubgo-ship-option,
    .woocommerce-checkout .hubgo-ship-option {
        padding: 10px;
        align-items: flex-start;
    }

    #hubgo-response .hubgo-ship-option-main,
    .woocommerce-cart .hubgo-ship-option-main,
    .woocommerce-checkout .hubgo-ship-option-main {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 12.5px;
        line-height: 1.3;
    }

    #hubgo-response .hubgo-ship-option-meta,
    .woocommerce-cart .hubgo-ship-option-meta,
    .woocommerce-checkout .hubgo-ship-option-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        font-size: 12px;
        min-width: 0;
        max-width: 50%;
        text-align: right;
    }

    .woocommerce-cart .hubgo-cep-popover,
    .woocommerce-checkout .hubgo-cep-popover {
        position: fixed;
        top: 74px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        z-index: 999999;
    }

    .woocommerce-cart .hubgo-cep-popover-inner:before,
    .woocommerce-checkout .hubgo-cep-popover-inner:before {
        display: none;
    }

    .hubgo-ship-card-head {
        grid-template-columns: 1fr 100px;
        padding: 10px 12px;
    }

    .hubgo-ship-item {
        padding: 12px;
    }

    .hubgo-ship-note,
    .hubgo-ship-foot {
        padding: 9px 12px;
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .hubgo-empty-state-card {
        padding: 16px 14px;
    }

    .hubgo-empty-state-title {
        font-size: 13px;
    }

    .hubgo-empty-state-text {
        font-size: 12px;
    }

    .hubgo-empty-state-action .hubgo-cep-widget {
        width: 100%;
    }

    .hubgo-empty-state-action .hubgo-cep-popover,
    #hubgo-response .hubgo-ship-picker-cep .hubgo-cep-popover,
    .woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-popover,
    .woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-popover {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: min(360px, calc(100vw - 24px));
        z-index: 999999;
    }

    .hubgo-empty-state-action .hubgo-cep-popover-inner,
    #hubgo-response .hubgo-ship-picker-cep .hubgo-cep-popover-inner,
    .woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-popover-inner,
    .woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-popover-inner {
        width: 100%;
    }

    .hubgo-empty-state-action .hubgo-cep-popover-inner:before,
    #hubgo-response .hubgo-ship-picker-cep .hubgo-cep-popover-inner:before,
    .woocommerce-cart .hubgo-ship-picker-cep .hubgo-cep-popover-inner:before,
    .woocommerce-checkout .hubgo-ship-picker-cep .hubgo-cep-popover-inner:before {
        display: none;
    }

    #hubgo-response .hubgo-loading-card {
        padding: 12px 14px;
    }
}
