/**
 * RaceChip API pricing UI components.
 * Loaded on top of main.css. All classes are scoped to .rc-api-* to avoid collisions.
 */

/* ---------- Price block (single product) ---------- */
.rc-api-price-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1rem;
}

.rc-api-price-block .rc-api-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.rc-api-price-regular {
    color: #6b7280;
    text-decoration: line-through;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}

.rc-api-price-special {
    color: #EC5B13;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
}

.rc-api-price-current {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    letter-spacing: -0.01em;
}

/* ---------- Sale badge ---------- */
.rc-api-sale-badge {
    background: #EC5B13;
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(236, 91, 19, 0.25);
}

/* ---------- Sale deadline ---------- */
.rc-api-sale-deadline {
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.rc-api-sale-deadline svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.rc-api-sale-deadline .rc-api-countdown {
    color: #dc2626;
    font-weight: 600;
    margin-left: 4px;
}

/* ---------- GTIN ---------- */
.rc-api-gtin {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 0.02em;
    margin-top: 6px;
    user-select: all;
}

/* ---------- Trust banner ---------- */
.rc-api-trust-banner {
    max-width: 600px;
    margin: 24px auto;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fafafa;
}

.rc-api-trust-banner svg {
    width: 14px;
    height: 14px;
    color: #10b981;
    flex-shrink: 0;
}

/* ---------- Archive cards ---------- */
.rc-api-card-sale-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.35);
}

.rc-api-card-price {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.1;
}

.rc-api-price-from {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.rc-api-card-price .rc-api-price-regular {
    font-size: 12px;
}

.rc-api-card-price .rc-api-price-special {
    font-size: 18px;
}

.rc-api-card-price .rc-api-price-current {
    font-size: 18px;
}

/* ---------- Engine card datos oficiales pill ---------- */
.rc-api-official-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    color: #047857;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.rc-api-official-pill::before {
    content: "✓";
    font-size: 10px;
}

/* ---------- Year range ---------- */
.rc-api-year-range {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .rc-api-price-special,
    .rc-api-price-current {
        font-size: 26px;
    }
    .rc-api-price-block .rc-api-price-row {
        gap: 8px;
    }
    .rc-api-trust-banner {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* ============================================================================
 * Local pricing (tabla manual + IVA) — visible cuando hay precio local definido.
 * ============================================================================ */
.rc-local-price del {
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 6px;
    font-size: 0.85em;
}
.rc-local-price ins {
    color: #EC5B13;
    text-decoration: none;
    font-weight: 800;
}
.rc-local-price__discount {
    display: inline-block;
    background: #EC5B13;
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    margin-left: 6px;
    vertical-align: middle;
}
.rc-local-price__iva-note {
    color: #6b7280;
    font-size: 0.75em;
    margin-left: 4px;
    font-weight: 500;
}
.rc-price-secondary {
    color: #6b7280;
    font-size: 0.75em;
    font-weight: 500;
    margin-left: 6px;
}

/* Price range mode ("Desde X · hasta Y") */
.rc-local-price--range {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.rc-local-price__from-label {
    font-size: 0.7em;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rc-local-price__range-hint {
    font-size: 0.75em;
    color: #9ca3af;
    font-weight: 500;
}
