/* ==========================================================================
   Ringomize - Buy More, Save More
   Frontend styles - Approved "Larger Text & Centered" design
   Applied identically to Mini Cart and Cart (no separate compact variant)
   ========================================================================== */

/* ---- Progress widget (Cart / Mini Cart) ---- */
.rqd-widget {
    --rqd-cols: 5;
    max-width: 460px;
    margin: 0 auto 10px;
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 2px 6px 0px;
    font-family: inherit;
    box-shadow: none;
}
.rqd-widget * { box-sizing: border-box; }
.rqd-widget.flat { border: none; padding: 0; margin: 0; }

/* ---- top row ---- */
.rqd-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0px;
}
.rqd-heading {
    font-size: 9.5px;
    font-weight: 800;
    color: #0b1a33;
    margin: 0;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.rqd-sub { font-size: 7.5px; font-weight: 600; color: #94a3b8; margin: 0; }

/* ---- grid rows ---- */
.rqd-row {
    display: grid;
    grid-template-columns: 24px repeat(var(--rqd-cols, 5), 1fr);
    align-items: center;
    gap: 0;
}
.rqd-row .rqd-label {
    font-size: 7px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

/* ---- mini-cart totals block (unchanged, sits below the widget) ---- */
.rqd-mc-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0 6px;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
}
.rqd-mc-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #475569;
}
.rqd-mc-row.rqd-orig-price span:last-child { color: #64748b; }
.rqd-mc-row.rqd-discount { font-weight: 700; }
.rqd-mc-row.rqd-discount span:last-child { color: #0f172a; }
.rqd-mc-row.rqd-shipping span:last-child { color: #64748b; }
.rqd-mc-row.rqd-mc-total {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2px;
    padding-top: 4px;
    border-top: 1px solid #e5e7eb;
}

/* ---- qty & save cells ---- */
.rqd-col {
    text-align: center;
    font-size: 8.5px;
    font-weight: 800;
    color: #cbd5e1;
    transition: color 0.25s ease;
    line-height: 1.2;
    padding: 1px 0;
}
.rqd-col.active { color: #0b1a33; }
.rqd-qty-row { margin-bottom: 1px; }
.rqd-amt-row { margin-top: 1px; }

.rqd-col.amt { font-size: 7.5px; font-weight: 700; color: #94a3b8; line-height: 1.3; }
.rqd-col.amt.active { color: #0b1a33; }
.rqd-col.amt .ship-tag {
    display: inline;
    font-size: 6.5px;
    font-weight: 700;
    color: #0b1a33;
    background: #eef2f6;
    padding: 0.5px 4px;
    border-radius: 0;
    margin-left: 2px;
    white-space: nowrap;
}
.rqd-col.amt.active .ship-tag { background: #dce4ed; }

/* ---- track row ---- */
.rqd-track-row { height: 18px; position: relative; }
.rqd-track-row .rqd-label { align-self: start; padding-top: 2px; }
.rqd-track-cell { position: relative; grid-column: 2 / span var(--rqd-cols, 5); height: 100%; }

/* ---- track bar - perfectly centered under nodes ---- */
.rqd-track {
    position: absolute;
    top: 50%;
    left: calc(100% / (2 * var(--rqd-cols, 5)));
    right: calc(100% / (2 * var(--rqd-cols, 5)));
    height: 4px;
    background: #e9edf2;
    border-radius: 0;
    transform: translateY(-50%);
    overflow: hidden;
}
.rqd-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #0b1a33;
    border-radius: 0;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0%;
}

/* ---- nodes ---- */
.rqd-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(var(--rqd-cols, 5), 1fr);
    pointer-events: none;
}
.rqd-node-cell { display: flex; align-items: center; justify-content: center; pointer-events: auto; }

.rqd-node {
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    transition: transform 0.2s ease, border-color 0.25s, background 0.25s, box-shadow 0.25s;
    position: relative;
    flex-shrink: 0;
}
.rqd-node.achieved { border-color: #0b1a33; background: #0b1a33; }
.rqd-node.current {
    border-color: #0b1a33;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(11, 26, 51, 0.15);
}

/* ---- ship node (truck) ---- */
.rqd-node.ship {
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #cbd5e1;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}
.rqd-node.ship.achieved { background: #0b1a33; border-color: #0b1a33; color: #fff; }
.rqd-node.ship.current {
    border-color: #0b1a33;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(11, 26, 51, 0.12);
}

/* ---- status chip ---- */
.rqd-status-container { display: flex; justify-content: center; margin-top: 1px; }
.rqd-status {
    font-size: 8px;
    font-weight: 600;
    color: #334155;
    padding: 1px 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.15px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rqd-status .tick { color: #0b1a33; font-weight: 700; }
.rqd-status .muted { color: #64748b; font-weight: 600; }
.rqd-status .sep { color: #cbd5e1; margin: 0 3px; }

/* ---- responsive ---- */
@media (max-width: 420px) {
    .rqd-widget { padding: 2px 4px 0px; }
    .rqd-heading { font-size: 8.5px; }
    .rqd-sub { display: none; }
    .rqd-row { grid-template-columns: 18px repeat(var(--rqd-cols, 5), 1fr); }
    .rqd-row .rqd-label { font-size: 6.5px; }
    .rqd-col { font-size: 7.5px; }
    .rqd-col.amt { font-size: 6.5px; }
    .rqd-col.amt .ship-tag { font-size: 5.5px; padding: 0 3px; }
    .rqd-node { width: 10px; height: 10px; border-width: 1.5px; }
    .rqd-node.ship { width: 16px; height: 16px; font-size: 8px; }
    .rqd-track-row { height: 16px; }
    .rqd-status { font-size: 7px; padding: 0 8px; white-space: normal; }
}
@media (max-width: 360px) {
    .rqd-col.amt .ship-tag { display: inline-block; margin-left: 1px; }
    .rqd-status { font-size: 6.5px; padding: 0 6px; }
    .rqd-row .rqd-label { font-size: 6px; }
    .rqd-col { font-size: 7px; }
    .rqd-col.amt { font-size: 6px; }
    .rqd-node { width: 8px; height: 8px; border-width: 1.5px; }
    .rqd-node.ship { width: 14px; height: 14px; font-size: 7px; }
    .rqd-track-row { height: 14px; }
    .rqd-track { height: 3px; }
}

/* ---- Shop page corner badge ---- */
.rqd-badge-corner-tiny {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 3px;
    background: transparent;
    border: none;
    color: #b8860b;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: none;
    text-decoration: none;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
}
.rqd-badge-corner-tiny svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}
ul.products li.product,
.woocommerce ul.products li.product {
    position: relative;
}
ul.products li.product a img,
.woocommerce ul.products li.product a img {
    position: relative;
}

/* ---- Single product page link + popup ---- */
.rqd-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #b8860b;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #b8860b;
    line-height: 1;
}
.rqd-badge-link svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.rqd-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}
.rqd-popup-box {
    background: #fff;
    width: 90%;
    max-width: 320px;
    padding: 20px 20px 18px;
    position: relative;
    box-sizing: border-box;
}
.rqd-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 18px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px;
}
.rqd-popup-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #111;
    margin: 0 0 3px;
}
.rqd-popup-sub { font-size: 10.5px; color: #999; margin: 0 0 14px; }
.rqd-popup-tier-list { display: flex; flex-direction: column; }
.rqd-popup-tier-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 12px;
}
.rqd-popup-tier-row:last-child { border-bottom: none; }
.rqd-popup-tier-qty { font-weight: 700; color: #111; }
.rqd-popup-tier-val { font-weight: 600; color: #555; }
.rqd-popup-tier-val.ship { color: #111; }

/* ---- Checkout page: simple discount confirmation, no progress bar ---- */
.rqd-checkout-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
}
.rqd-checkout-note .icon { font-size: 14px; }

@media (max-width: 480px) {
    .rqd-widget { padding: 8px 10px 5px; }
    .rqd-row { grid-template-columns: 22px repeat(var(--rqd-cols, 5), 1fr); }
    .rqd-heading { font-size: 9px; }
    .rqd-sub { display: none; }
}
/* ===== Custom overrides (provided) — mini-cart totals compact spacing ===== */
.rqd-mc-totals {
    margin-bottom: -10px !important;
}
p.woocommerce-mini-cart__total.total {
    display: none;
}

.rqd-mc-row.rqd-mc-total {
    margin-top: 0px;
    padding-top: 0px;
    border-top: 1px solid #cccccc;
}
.rqd-mc-totals {
    gap: 0px;
    line-height: 1.8;
}
.rqd-widget.compact {
    margin-bottom: 0px !important;
    padding: 0 8px;
}
p.rqd-heading {
    line-height: 1.3em;
    padding-top: 5px;
}
