/* ═══════════════════════════════════════════════════════════
   HS Recently Viewed — Toolbar Badge
═══════════════════════════════════════════════════════════ */
.hs-rv-toolbar-btn {
    height: 40px;
    padding: 0 18px;
    background: #fff;
    color: #7c3aed;
    border: 1.5px solid #ddd6fe;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: none; /* shown via JS when count > 0 */
    align-items: center;
    gap: 7px;
    transition: all .18s;
    white-space: nowrap;
}
.hs-rv-toolbar-btn:hover { background: #f5f3ff; border-color: #7c3aed; }
.hs-rv-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #7c3aed;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   Viewed state on diamond page rows / cards
═══════════════════════════════════════════════════════════ */
tr.hs-rv-viewed { background: #fffbf2 !important; }
.generated-card.hs-rv-viewed,
.generated-gallery-card.hs-rv-viewed { outline: 2px solid #f59e0b; }

a.hs-rv-viewed-btn,
.generated-view-btn.hs-rv-viewed-btn {
    position: relative;
}
a.hs-rv-viewed-btn::after,
.generated-view-btn.hs-rv-viewed-btn::after {
    content: '✓';
    position: absolute;
    top: -7px;
    right: -7px;
    width: 15px;
    height: 15px;
    background: #f59e0b;
    border-radius: 50%;
    font-size: 9px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: 900;
}

/* ═══════════════════════════════════════════════════════════
   Recently Viewed Page
═══════════════════════════════════════════════════════════ */
#rv-container {
    max-width: 1620px;
    margin: 30px auto;
    padding: 0 20px;
}
.rv-loader {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid #ddd;
    border-top-color: purple;
    animation: rv-spin .8s linear infinite;
    margin: auto;
}
@keyframes rv-spin { to { transform: rotate(360deg); } }

.rv-empty {
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
}
.rv-empty-icon { font-size: 56px; display: block; margin-bottom: 14px; }
.rv-empty h3 { font-size: 18px; color: #666; margin: 0 0 8px; }
.rv-empty p  { font-size: 14px; margin: 0; }

/* Time badge on card image */
.rv-time-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,.52);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 2;
    pointer-events: none;
}

/* Remove btn — show on row hover */
.rv-remove-btn { opacity: 0; transition: opacity .15s; }
tr.data-row:hover .rv-remove-btn,
.generated-card:hover .rv-remove-btn { opacity: 1; }

/* ── Shared diamond display styles (needed on RV page) ──────── */
:root {
    --navy: #0f3460;
    --muted: #666;
    --border: #e5e7eb;
}
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    background: #4B1662;
    color: #fff;
    height: 60px;
    padding: 11px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}
.data-table td {
    color: #666;
    font-size: 14px;
    height: 58px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    padding: 6px 10px;
}
.data-table tr.data-row { transition: background .12s; }
.data-table tr.data-row:hover { background: #f8f5ff; }
.tc { text-align: center !important; }
.table-price { color: #333; font-weight: 600; white-space: nowrap; }
.lab-logo { height: 22px; width: auto; display: block; margin: auto; }

.search-table-btn {
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #222;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 13px;
    white-space: nowrap;
}
.search-table-btn:hover { background: #000; }

.generated-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}
.generated-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    transition: transform .25s;
}
.generated-card:hover { transform: translateY(-4px); }
.generated-card-img {
    height: 220px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: purple;
    position: relative;
    border-bottom: 1px solid #eee;
}
.generated-card-img svg { width: 145px; height: 145px; }
.card-cert {
    position: absolute;
    top: 14px;
    right: 14px;
    height: 28px;
    padding: 2px 6px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.card-cert .lab-logo { height: 20px; }
.generated-card-body { padding: 16px; }
.generated-card-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}
.generated-card-price { color: purple; white-space: nowrap; }
.generated-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.generated-spec-grid span {
    padding: 7px 4px;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-right: 1px solid #eee;
}
.generated-spec-grid span:last-child { border-right: none; }
.generated-card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.generated-view-btn {
    height: 36px;
    padding: 0 20px;
    background: #222;
    color: #fff !important;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    font-size: 13px;
}
.generated-view-btn:hover { background: #000; }

.shp-svg { color: purple; }

/* ── View toggle + clear btn (reused from diamond page) ──── */
.view-controls {
    height: 40px;
    background: #fff;
    width: max-content;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.view-btn {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}
.view-btn:hover, .view-btn.active { color: purple; }
.view-btn-mid { border-left: 1px solid #ddd; border-right: 1px solid #ddd; }
.btn-clear-all {
    height: 40px;
    padding: 0 18px;
    background: #fff;
    color: #dc2626;
    border: 1.5px solid #fecaca;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .18s;
}
.btn-clear-all:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
