/* ========================================================================
   Section Container + CSS Custom Properties
   ======================================================================== */
.tp-picks {
    --tp-section-bg: #F0F7FF;
    --tp-card-bg: #FFFFFF;
    --tp-card-border: #E5E7EB;
    --tp-btn: #0E7AE5;
    --tp-btn-text: #FFFFFF;
    --tp-heading: #111827;
    --tp-text-muted: #6B7280;
    --tp-radius-section: 14px;
    --tp-radius-card: 10px;
    --tp-radius-badge: 6px;
    --tp-radius-btn: 8px;
    --tp-inner-gap: 8px;
    --tp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: var(--tp-section-bg);
    border-width: var(--tp-sec-bw, 0);
    border-style: var(--tp-sec-bs, none);
    border-color: var(--tp-sec-bc, transparent);
    border-radius: var(--tp-sec-radius, var(--tp-radius-section));
    padding: 24px;
    margin: 28px 0;
    font-family: var(--tp-font);
    line-height: 1.5;
    box-sizing: border-box;
}
.tp-picks *, .tp-picks *::before, .tp-picks *::after {
    box-sizing: border-box;
}

/* ========================================================================
   Header
   ======================================================================== */
.tp-picks__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tp-card-border);
}
.tp-picks__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--tp-heading);
    margin: 0;
    padding: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* ========================================================================
   Cards Container — layout variants
   ======================================================================== */
.tp-picks__cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Grid layout */
.tp-layout-grid .tp-picks__cards {
    display: grid;
    grid-template-columns: repeat(var(--tp-grid-cols, auto-fill), minmax(200px, 1fr));
    gap: 14px;
}
/* Fixed column counts override minmax auto-fill */
.tp-picks[style*="--tp-grid-cols:2"] .tp-picks__cards { grid-template-columns: repeat(2, 1fr); }
.tp-picks[style*="--tp-grid-cols:3"] .tp-picks__cards { grid-template-columns: repeat(3, 1fr); }
.tp-picks[style*="--tp-grid-cols:4"] .tp-picks__cards { grid-template-columns: repeat(4, 1fr); }
.tp-picks[style*="--tp-grid-cols:5"] .tp-picks__cards { grid-template-columns: repeat(5, 1fr); }

/* ========================================================================
   Gap size modifiers
   ======================================================================== */
.tp-gap-compact .tp-picks__cards  { gap: 6px; }
.tp-gap-default .tp-picks__cards  { /* uses layout default */ }
.tp-gap-spacious .tp-picks__cards { gap: 18px; }
.tp-gap-compact.tp-layout-grid .tp-picks__cards  { gap: 8px; }
.tp-gap-spacious.tp-layout-grid .tp-picks__cards { gap: 20px; }

/* ========================================================================
   Outline button style modifier
   ======================================================================== */
.tp-btn-outline .tp-card__cta {
    background: transparent;
    color: var(--tp-btn);
    border: 1.5px solid var(--tp-btn);
}
.tp-btn-outline .tp-card__cta:hover {
    background: var(--tp-btn);
    color: var(--tp-btn-text);
    opacity: 1;
}

/* ========================================================================
   Individual Card — Horizontal (default)
   ======================================================================== */
.tp-card {
    background: var(--tp-card-bg);
    border-width: var(--tp-card-bw, 1px);
    border-style: var(--tp-card-bs, solid);
    border-color: var(--tp-card-bc, var(--tp-card-border));
    border-radius: var(--tp-card-radius, var(--tp-radius-card));
    box-shadow: var(--tp-card-shadow, none);
    display: flex;
    align-items: center;
    gap: var(--tp-inner-gap);
    padding: 16px 18px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tp-card:hover {
    border-color: var(--tp-btn);
}

/* Rank number */
.tp-card__rank {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--tp-btn);
    color: var(--tp-btn-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* Badge */
.tp-card__badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--tp-radius-badge);
    background: var(--tp-badge-bg, rgba(14, 122, 229, 0.09));
    color: var(--tp-badge-text, #0E7AE5);
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

/* Card Image / Logo */
.tp-card__image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border: none;
    background: none;
    border-radius: 0;
    max-width: 100%;
}
.tp-card__image.tp-img-wide {
    width: auto;
    height: auto;
    object-fit: cover;
}
.tp-card__image.tp-img-rounded {
    border-radius: 8px;
    border: 1px solid var(--tp-card-border);
    background: #f9fafb;
}
.tp-card__image.tp-img-circle {
    border-radius: 50%;
    border: 1px solid var(--tp-card-border);
    background: #f9fafb;
}

/* Body */
.tp-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--tp-inner-gap);
}
.tp-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--tp-heading);
    margin: 0;
    line-height: 1.3;
}
.tp-card__desc {
    font-size: 13px;
    color: var(--tp-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* CTA Button */
.tp-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    background: var(--tp-btn);
    color: var(--tp-btn-text);
    border-radius: var(--tp-radius-btn);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    line-height: 1.3;
}
.tp-card__cta:hover {
    opacity: 0.88;
    transform: translateX(1px);
    color: var(--tp-btn-text);
    text-decoration: none;
}
.tp-card__cta svg {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.tp-card__cta:hover svg {
    transform: translateX(2px);
}

/* ========================================================================
   Grid Layout Card Overrides
   ======================================================================== */
.tp-layout-grid .tp-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: var(--tp-inner-gap);
}
.tp-layout-grid .tp-card__rank {
    position: absolute;
    top: -8px;
    left: 14px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.tp-layout-grid .tp-card__body {
    width: 100%;
}
.tp-layout-grid .tp-card__cta {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

/* ========================================================================
   Compact Layout Card Overrides
   ======================================================================== */
.tp-layout-compact .tp-card {
    padding: 10px 14px;
    gap: var(--tp-inner-gap);
    border-radius: 8px;
}
.tp-layout-compact .tp-card__rank {
    width: 24px;
    height: 24px;
    font-size: 11px;
    border-radius: 6px;
}
.tp-layout-compact .tp-card__badge {
    font-size: 10px;
    padding: 2px 8px;
}
.tp-layout-compact .tp-card__name {
    font-size: 14px;
}
.tp-layout-compact .tp-card__desc {
    display: none;
}
.tp-layout-compact .tp-card__cta {
    padding: 6px 14px;
    font-size: 12px;
}

/* ========================================================================
   Footer / Trust Bar
   ======================================================================== */
.tp-picks__footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--tp-card-border);
    text-align: center;
}
.tp-picks__why {
    font-size: 11px;
    color: var(--tp-text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: default;
}

/* ========================================================================
   Responsive — mobile stacking
   ======================================================================== */
@media (max-width: 600px) {
    .tp-picks {
        padding: 16px;
        border-radius: 10px;
        margin: 20px 0;
    }
    .tp-picks__title {
        font-size: 15px;
    }
    /* Horizontal cards become stacked on mobile */
    .tp-layout-horizontal .tp-card {
        flex-wrap: wrap;
        gap: 8px;
    }
    .tp-layout-horizontal .tp-card__cta {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    /* Grid becomes single column */
    .tp-layout-grid .tp-picks__cards {
        grid-template-columns: 1fr;
    }
}
