/* TBS Affiliate Preisvergleich v1.6.4 – Frontend Widget */

.tbsapc-widget {
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    background: #fafafa;
    font-size: 0.93em;
    position: relative;
}
.tbsapc-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(90deg, #0070ba 0%, #3aa757 50%, #ff9900 100%);
}

.tbsapc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.tbsapc-title {
    font-weight: 800;
    font-size: 1em;
    color: #1d2327;
    letter-spacing: .3px;
}
.tbsapc-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78em; font-weight: 700; }
.tbsapc-badge--best { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }

/* ── Angebot-Zeilen ── */
.tbsapc-offers { display: flex; flex-direction: column; gap: 8px; }

.tbsapc-offer {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    padding: 11px 14px;
    transition: border-color .15s, box-shadow .15s;
}
.tbsapc-offer:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.tbsapc-offer--best {
    border-color: #a5d6a7;
    background: linear-gradient(135deg, #f1fbf2 0%, #fff 70%);
}

/* ── Shop-Logo (kein Netzwerk-Logo!) ── */
.tbsapc-offer__shop {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* Clearbit / Google Logo */
.tbsapc-shop-logo {
    height: 18px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    flex-shrink: 0;
}

/* Name als Fallback wenn kein Logo */
.tbsapc-shop-name-text,
.tbsapc-shop-name-fallback {
    font-weight: 700;
    font-size: .85em;
    color: #1d2327;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    border-radius: 5px;
    padding: 5px 10px;
    min-width: 70px;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
}

/* ── Preis-Block ── */
.tbsapc-offer__pricing {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tbsapc-offer__price {
    font-weight: 800;
    font-size: 1.15em;
    color: #1d2327;
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.tbsapc-currency {
    font-size: .72em;
    font-weight: 600;
    color: #888;
    background: #f0f0f1;
    padding: 1px 5px;
    border-radius: 3px;
}
.tbsapc-offer__delivery {
    font-size: .78em;
    color: #888;
}
.tbsapc-offer__delivery.tbsapc-free-shipping,
.tbsapc-offer__delivery:has(.tbsapc-free) {
    color: #3aa757;
}
.tbsapc-offer__total {
    font-size: .76em;
    color: #aaa;
}

/* ── CTA Button ── */
.tbsapc-offer__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: #555;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-size: .83em;
    font-weight: 700;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.tbsapc-offer__btn:hover { background: #333; transform: translateY(-1px); }
.tbsapc-offer__btn--best { background: #2e7d32; }
.tbsapc-offer__btn--best:hover { background: #1b5e20; }
.tbsapc-arrow { font-size: 1em; }

/* ── Mehr anzeigen ── */
.tbsapc-show-more {
    background: none;
    border: 1.5px dashed #ddd;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    padding: 8px 14px;
    font-size: .82em;
    width: 100%;
    margin-top: 2px;
    transition: background .15s, border-color .15s;
    text-align: center;
}
.tbsapc-show-more:hover { background: #f5f5f5; border-color: #bbb; }

.tbsapc-more-offers {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* ── Disclaimer ── */
.tbsapc-disclaimer {
    margin: 10px 0 0;
    font-size: .74em;
    color: #bbb;
    line-height: 1.4;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .tbsapc-offer {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .tbsapc-offer__shop { justify-content: flex-start; }
    .tbsapc-offer__btn  { width: 100%; justify-content: center; }
    .tbsapc-shop-logo   { max-width: 60px; }
}

/* ── Grundpreis (PAngV) ── */
.tbsapc-offer__grundpreis {
    font-size: .72em;
    color: #777;
    display: block;
    margin-top: 1px;
}

/* ── eBay Auktion / Festpreis Badges ───────────────────────── */
.tbsapc-ebay-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
    white-space: nowrap;
}
.tbsapc-ebay-badge--auction {
    background: #e53935;
    color: #fff;
}
.tbsapc-ebay-badge--fixed {
    background: #3aa757;
    color: #fff;
}
.tbsapc-ebay-badge--ended {
    background: #888;
    color: #fff;
}
.tbsapc-ebay-countdown {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
    line-height: 1.4;
}
.tbsapc-ebay-countdown--ending {
    background: #ffebee;
    color: #c62828;
    border-color: #ef5350;
    animation: tbsapc-pulse 1s infinite;
}
@keyframes tbsapc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Versandkosten Sonderstile ─────────────────────────────────── */
.tbsapc-shipping-unknown {
    display: inline-block;
    font-weight: 600;
    color: #b07a00;
    background: #fff8e1;
    border: 1px solid #ffd54f;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
}
.tbsapc-free-shipping-badge {
    display: inline-block;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    background: #00ff88;
    color: #003322;
    border: 1px solid #00cc6a;
    box-shadow: 0 0 8px rgba(0, 255, 140, 0.55), inset 0 0 4px rgba(255,255,255,0.6);
    text-shadow: 0 0 2px rgba(255,255,255,0.5);
    animation: tbsapc-neon-pulse 2.4s ease-in-out infinite;
}
@keyframes tbsapc-neon-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 140, 0.55), inset 0 0 4px rgba(255,255,255,0.6); }
    50%      { box-shadow: 0 0 14px rgba(0, 255, 140, 0.9),  inset 0 0 6px rgba(255,255,255,0.85); }
}

/* ── Hybrid-Einzelproduktansicht v2.11 ─────────────────────────────── */
.tbsapc-hybrid,
.tbsapc-hybrid *,
.tbsapc-hybrid *::before,
.tbsapc-hybrid *::after {
    box-sizing: border-box;
}

.tbsapc-hybrid {
    --tbsapc-blue: var(--tbs-neon-secondary, #1769e0);
    --tbsapc-blue-dark: var(--tbs-neon-primary, #0c4fb4);
    --tbsapc-navy: var(--tbs-neon-text, currentColor);
    --tbsapc-muted: var(--tbs-neon-muted, currentColor);
    --tbsapc-line: var(--tbs-neon-border, #dfe5ec);
    --tbsapc-soft: var(--tbs-neon-surface-soft, transparent);
    --tbsapc-surface: var(--tbs-neon-surface, transparent);
    --tbsapc-green: var(--tbs-neon-accent, #218739);
    --tbsapc-amber: var(--tbs-neon-primary, #a85d00);
    --tbsapc-text: var(--tbs-neon-text, inherit);
    width: 100%;
    margin: 24px 0;
    padding: 24px;
    border: 1px solid var(--tbsapc-line);
    border-radius: 14px;
    background: transparent;
    color: var(--tbsapc-text);
    box-shadow: 0 8px 28px rgba(20, 33, 61, .08);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.55;
}

.tbsapc-hybrid h2,
.tbsapc-hybrid h3,
.tbsapc-hybrid p,
.tbsapc-hybrid dl {
    margin-top: 0;
}

.tbsapc-hybrid h2,
.tbsapc-hybrid h3 {
    color: inherit;
    font-family: inherit;
    line-height: 1.25;
}

.tbsapc-hybrid h3 {
    margin-bottom: 16px;
    font-size: 1.22rem;
}

.tbsapc-hybrid__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tbsapc-line);
}

.tbsapc-hybrid__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--tbsapc-blue);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tbsapc-hybrid__title {
    margin-bottom: 0;
    font-size: 1.55rem;
}

.tbsapc-hybrid__best-price {
    min-width: 180px;
    padding: 12px 16px;
    border: 1px solid var(--tbsapc-line);
    border-radius: 10px;
    background: var(--tbsapc-soft);
}

.tbsapc-hybrid__best-price span,
.tbsapc-hybrid__best-price small {
    display: block;
    color: var(--tbsapc-muted);
    font-size: .76rem;
}

.tbsapc-hybrid__best-price strong {
    display: block;
    color: var(--tbsapc-green);
    font-size: 1.45rem;
}

.tbsapc-hybrid__information {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid var(--tbsapc-line);
    border-radius: 12px;
}

.tbsapc-hybrid__description,
.tbsapc-hybrid__features {
    min-width: 0;
    padding: 22px;
}

.tbsapc-hybrid__description {
    border-right: 1px solid var(--tbsapc-line);
}

.tbsapc-hybrid__description-text {
    color: inherit;
}

.tbsapc-hybrid__description-text p:last-child {
    margin-bottom: 0;
}

.tbsapc-hybrid__feature-grid {
    margin-bottom: 0;
    border: 1px solid var(--tbsapc-line);
    border-radius: 8px;
    overflow: hidden;
}

.tbsapc-hybrid__feature {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) minmax(130px, 1.2fr);
    border-bottom: 1px solid var(--tbsapc-line);
}

.tbsapc-hybrid__feature:last-child {
    border-bottom: 0;
}

.tbsapc-hybrid__feature:nth-child(n+7) {
    display: none;
}

.tbsapc-hybrid__features.is-expanded .tbsapc-hybrid__feature {
    display: grid;
}

.tbsapc-hybrid__feature dt,
.tbsapc-hybrid__feature dd {
    margin: 0;
    padding: 9px 11px;
}

.tbsapc-hybrid__feature dt {
    background: var(--tbsapc-soft);
    color: var(--tbsapc-muted);
    font-size: .79rem;
    font-weight: 700;
}

.tbsapc-hybrid__feature dd {
    color: inherit;
    font-size: .84rem;
    overflow-wrap: anywhere;
}

.tbsapc-hybrid__features-toggle {
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tbsapc-blue);
    cursor: pointer;
    font: inherit;
    font-size: .83rem;
    font-weight: 700;
}

.tbsapc-hybrid__variant-notice {
    margin: 0 0 24px;
    padding: 12px 15px;
    border: 1px solid #f0c36a;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fff9eb;
    color: #694400;
    font-size: .88rem;
}

.tbsapc-hybrid__top {
    margin: 26px 0;
}

.tbsapc-hybrid__top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tbsapc-hybrid-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 18px;
    border: 1px solid var(--tbsapc-line);
    border-radius: 10px;
    background: var(--tbsapc-surface);
}

.tbsapc-hybrid-card--best {
    border-color: #8fce9a;
    box-shadow: inset 0 3px 0 #2e9843;
}

.tbsapc-hybrid-card__best {
    position: absolute;
    top: -12px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 5px;
    background: #2e9843;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
}

.tbsapc-hybrid-card__header {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.tbsapc-hybrid-card__shop {
    min-width: 0;
}

.tbsapc-hybrid-card__price {
    display: block;
    color: inherit;
    font-size: 1.35rem;
}

.tbsapc-hybrid-card__shipping {
    color: var(--tbsapc-muted);
    font-size: .78rem;
}

.tbsapc-hybrid-card__equipment {
    flex: 1;
    margin: 14px 0;
    color: inherit;
    font-size: .83rem;
}

.tbsapc-hybrid-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--tbsapc-muted);
    font-size: .78rem;
}

.tbsapc-hybrid-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--tbsapc-line);
    font-size: .82rem;
}

.tbsapc-hybrid-card__footer a,
.tbsapc-hybrid__action,
.tbsapc-hybrid__amazon a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 7px;
    background: var(--tbsapc-blue);
    color: #fff !important;
    font-size: .8rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

.tbsapc-hybrid-card__footer a:hover,
.tbsapc-hybrid__action:hover,
.tbsapc-hybrid__amazon a:hover {
    background: var(--tbsapc-blue-dark);
    color: #fff !important;
}

.tbsapc-hybrid__comparison {
    margin-top: 28px;
}

.tbsapc-hybrid__comparison-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.tbsapc-hybrid__comparison-heading h3 {
    margin-bottom: 0;
}

.tbsapc-hybrid__comparison-heading label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tbsapc-muted);
    font-size: .78rem;
}

.tbsapc-hybrid__comparison-heading select {
    width: auto;
    min-width: 220px;
    margin: 0;
    padding: 7px 32px 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: var(--tbsapc-surface);
    color: var(--tbsapc-text);
    color-scheme: light dark;
    font: inherit;
}

.tbsapc-hybrid__table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--tbsapc-line);
    border-radius: 9px;
}

.tbsapc-hybrid__table {
    width: 100%;
    min-width: 1040px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: auto;
}

.tbsapc-hybrid__table th,
.tbsapc-hybrid__table td {
    padding: 10px;
    border: 0;
    border-bottom: 1px solid var(--tbsapc-line);
    background: var(--tbsapc-surface);
    color: var(--tbsapc-text);
    font-size: .78rem;
    text-align: left;
    vertical-align: middle;
}

.tbsapc-hybrid__table th {
    background: var(--tbsapc-soft);
    color: #3e4c61;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

.tbsapc-hybrid__table tbody tr:last-child td {
    border-bottom: 0;
}

.tbsapc-hybrid__table tbody tr:hover td {
    background: color-mix(in srgb, currentColor 4%, transparent);
}

.tbsapc-hybrid__equipment {
    min-width: 230px;
    max-width: 360px;
}

.tbsapc-hybrid__condition,
.tbsapc-hybrid__type {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 5px;
    background: #eef2f7;
    color: #46556c;
    font-size: .69rem;
    font-weight: 800;
    white-space: nowrap;
}

.tbsapc-hybrid__type--auction {
    background: #fff0cf;
    color: var(--tbsapc-amber);
}

.tbsapc-hybrid__type--fixed {
    background: #eaf2ff;
    color: #1552a5;
}

.tbsapc-hybrid__availability {
    display: block;
    font-weight: 800;
    white-space: nowrap;
}

.tbsapc-hybrid__availability::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tbsapc-hybrid__availability--yes,
.tbsapc-hybrid__free {
    color: var(--tbsapc-green);
}

.tbsapc-hybrid__availability--no {
    color: #b42318;
}

.tbsapc-hybrid__table td small {
    display: block;
    margin-top: 3px;
    color: var(--tbsapc-muted);
    font-size: .68rem;
}

.tbsapc-hybrid__action--disabled {
    background: #e7e9ed;
    color: #777 !important;
    cursor: default;
}

.tbsapc-hybrid__unavailable {
    margin-top: 14px;
    border: 1px solid var(--tbsapc-line);
    border-radius: 9px;
}

.tbsapc-hybrid__unavailable summary {
    padding: 13px 15px;
    color: #b42318;
    cursor: pointer;
    font-size: .83rem;
    font-weight: 800;
}

.tbsapc-hybrid__unavailable[open] summary {
    border-bottom: 1px solid var(--tbsapc-line);
}

.tbsapc-hybrid__table--unavailable {
    opacity: .78;
}

.tbsapc-hybrid__amazon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #f2c16b;
    border-radius: 9px;
    background: #fffaf0;
}

.tbsapc-hybrid__amazon strong,
.tbsapc-hybrid__amazon span {
    display: block;
}

.tbsapc-hybrid__amazon span {
    color: var(--tbsapc-muted);
    font-size: .75rem;
}

.tbsapc-hybrid__amazon a {
    background: #242f3e;
}

.tbsapc-hybrid__disclaimer {
    margin: 14px 0 0 !important;
    color: var(--tbsapc-muted);
    font-size: .7rem;
    text-align: center;
}

.tbsapc-hybrid .tbsapc-ebay-countdown {
    margin: 4px 0 0;
    font-size: .66rem;
}

@media (max-width: 960px) {
    .tbsapc-hybrid__information {
        grid-template-columns: 1fr;
    }
    .tbsapc-hybrid__description {
        border-right: 0;
        border-bottom: 1px solid var(--tbsapc-line);
    }
    .tbsapc-hybrid__top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tbsapc-hybrid {
        padding: 16px;
        border-radius: 10px;
    }
    .tbsapc-hybrid__header,
    .tbsapc-hybrid__comparison-heading,
    .tbsapc-hybrid__amazon {
        align-items: stretch;
        flex-direction: column;
    }
    .tbsapc-hybrid__best-price {
        min-width: 0;
    }
    .tbsapc-hybrid__comparison-heading label {
        align-items: stretch;
        flex-direction: column;
    }
    .tbsapc-hybrid__comparison-heading select {
        width: 100%;
        min-width: 0;
    }
    .tbsapc-hybrid__table-wrap {
        overflow: visible;
        border: 0;
    }
    .tbsapc-hybrid__table,
    .tbsapc-hybrid__table tbody,
    .tbsapc-hybrid__table tr,
    .tbsapc-hybrid__table td {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .tbsapc-hybrid__table thead {
        display: none;
    }
    .tbsapc-hybrid__table tr {
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid var(--tbsapc-line);
        border-radius: 9px;
    }
    .tbsapc-hybrid__table td {
        display: grid;
        grid-template-columns: minmax(95px, .7fr) minmax(0, 1.3fr);
        gap: 12px;
        padding: 9px 11px;
    }
    .tbsapc-hybrid__table td::before {
        content: attr(data-label);
        color: var(--tbsapc-muted);
        font-size: .68rem;
        font-weight: 800;
        text-transform: uppercase;
    }
    .tbsapc-hybrid__equipment {
        max-width: none;
    }
    .tbsapc-hybrid__action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tbsapc-hybrid__information {
        margin-right: -4px;
        margin-left: -4px;
    }
    .tbsapc-hybrid__description,
    .tbsapc-hybrid__features {
        padding: 16px;
    }
    .tbsapc-hybrid__feature {
        grid-template-columns: 1fr;
    }
    .tbsapc-hybrid__feature dt {
        padding-bottom: 3px;
    }
    .tbsapc-hybrid__feature dd {
        padding-top: 3px;
    }
    .tbsapc-hybrid-card__footer {
        align-items: stretch;
        flex-direction: column;
    }
    .tbsapc-hybrid-card__footer a {
        width: 100%;
    }
}

/* Emoji/Icons im Widget-Header auf exakt 16px begrenzen */
.tbsapc-widget h4 img,
.tbsapc-widget h4 img.emoji,
img.emoji[src*="s.w.org"] {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    vertical-align: middle;
    display: inline-block !important;
}
