/* /best/{slug} Top Deal of the Day strip (Exp 15, 2026-05-19)
 *
 * Full-width amber banner pinned directly above the ranked-firms table on
 * every /best/* category lander. Compact sibling of home-deal-spotlight.css:
 * same amber palette + ribbon + discount badge + 3-col grid, but tighter
 * vertical rhythm because it sits inline in the col-md-8 column above the
 * table (not as a hero block).
 *
 * Layout: 3-col on desktop (discount | body | CTA), collapses to 2-row
 * stack on <768px with CTA full-width below the body.
 *
 * OPAQUE-BACKGROUND RULE (CLAUDE.md): the linear-gradient is layered over
 * var(--color-surface-card) so the strip stays readable regardless of the
 * page background underneath. Without the opaque layer the lavender page
 * background would bleed through and wash out the amber.
 */

.best-deal-strip {
    position: relative;
    margin: 0 0 24px;
    padding: 20px 22px 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #fde68a 100%), var(--color-surface-card, #fff);
    border: 1.5px solid #f59e0b;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.16), 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    isolation: isolate;
}

.best-deal-strip::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.best-deal-strip__ribbon {
    position: absolute;
    top: 0;
    left: 18px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 11px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.30);
    z-index: 2;
}

.best-deal-strip__ribbon i {
    font-size: 12px;
}

.best-deal-strip__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
}

.best-deal-strip__discount {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 8px 6px;
    background: #fff;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.16);
}

.best-deal-strip__discount-num {
    font-size: 30px;
    font-weight: 900;
    color: #92400e;
    line-height: 1;
    letter-spacing: -0.02em;
}

.best-deal-strip__discount-off {
    font-size: 10px;
    font-weight: 800;
    color: #b45309;
    letter-spacing: 0.1em;
    margin-top: 3px;
}

.best-deal-strip__body {
    min-width: 0;
}

.best-deal-strip__firm-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.best-deal-strip__logo {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    border-radius: 9px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.best-deal-strip__firm-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.best-deal-strip__firm-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.2;
}

.best-deal-strip__firm-name:hover {
    color: #b45309;
    text-decoration: underline;
}

.best-deal-strip__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.best-deal-strip__chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1.4;
    text-decoration: none;
}

.best-deal-strip__chip--grade {
    background: rgba(99, 102, 241, 0.10);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.best-deal-strip__chip--tp {
    background: rgba(0, 182, 122, 0.10);
    color: #00724d;
    border: 1px solid rgba(0, 182, 122, 0.25);
}

.best-deal-strip__chip--tp i {
    color: #00b67a;
    font-size: 12px;
}

.best-deal-strip__chip--tp:hover {
    background: rgba(0, 182, 122, 0.16);
}

.best-deal-strip__headline {
    margin: 6px 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.best-deal-strip__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.best-deal-strip__code-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border: 1.5px dashed #b45309;
    border-radius: 8px;
}

.best-deal-strip__code-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #b45309;
}

.best-deal-strip__code-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 0.04em;
}

.best-deal-strip__from {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #4a3a14;
}

.best-deal-strip__from i {
    color: #b45309;
    font-size: 14px;
}

.best-deal-strip__from strong {
    color: #1a1a2e;
    font-weight: 800;
}

.best-deal-strip__cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 200px;
}

.best-deal-strip__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.30);
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease;
    white-space: nowrap;
}

.best-deal-strip__cta:hover,
.best-deal-strip__cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.40);
    color: #0d0d18;
}

.best-deal-strip__cta:active {
    transform: translateY(0);
}

.best-deal-strip__cta-arrow {
    font-size: 18px;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.best-deal-strip__cta:hover .best-deal-strip__cta-arrow,
.best-deal-strip__cta:focus-visible .best-deal-strip__cta-arrow {
    transform: translateX(4px);
}

.best-deal-strip__cta-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #6b4a14;
    letter-spacing: 0.02em;
}

.best-deal-strip__cta-sub i {
    color: #059669;
    font-size: 13px;
}

/* Tablet — keep 3-col but tighten */
@media (max-width: 991px) {
    .best-deal-strip {
        padding: 18px 18px 14px;
    }
    .best-deal-strip__inner {
        gap: 16px;
    }
    .best-deal-strip__discount {
        min-width: 72px;
    }
    .best-deal-strip__discount-num {
        font-size: 26px;
    }
    .best-deal-strip__headline {
        font-size: 17px;
    }
    .best-deal-strip__cta-wrap {
        min-width: 180px;
    }
    .best-deal-strip__cta {
        padding: 11px 18px;
        font-size: 14px;
    }
}

/* Mobile — stack to 2 rows (discount + body on row 1, CTA full-width on row 2) */
@media (max-width: 768px) {
    .best-deal-strip {
        padding: 18px 16px 14px;
        margin-bottom: 20px;
    }
    .best-deal-strip__inner {
        grid-template-columns: auto 1fr;
        gap: 14px;
    }
    .best-deal-strip__discount {
        min-width: 64px;
        padding: 6px 5px;
    }
    .best-deal-strip__discount-num {
        font-size: 22px;
    }
    .best-deal-strip__discount-off {
        font-size: 9px;
    }
    .best-deal-strip__firm-name {
        font-size: 13px;
    }
    .best-deal-strip__headline {
        font-size: 15px;
        margin: 4px 0 6px;
    }
    .best-deal-strip__cta-wrap {
        grid-column: 1 / -1;
        min-width: 0;
    }
    .best-deal-strip__cta {
        padding: 11px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .best-deal-strip__ribbon {
        font-size: 9px;
        padding: 3px 9px;
        left: 12px;
    }
    .best-deal-strip__meta-row {
        gap: 6px;
        font-size: 12px;
    }
    .best-deal-strip__code-pill {
        padding: 3px 8px;
    }
    .best-deal-strip__code-value {
        font-size: 12px;
    }
}

/* Reduced motion — neutralize transforms; keep gradient + shadow */
@media (prefers-reduced-motion: reduce) {
    .best-deal-strip__cta,
    .best-deal-strip__cta-arrow {
        transition: none;
    }
    .best-deal-strip__cta:hover,
    .best-deal-strip__cta:focus-visible {
        transform: none;
    }
    .best-deal-strip__cta:hover .best-deal-strip__cta-arrow,
    .best-deal-strip__cta:focus-visible .best-deal-strip__cta-arrow {
        transform: none;
    }
}
