/**
 * PDC Price Alerts Widget
 */

.pdc-price-alerts {
    margin: 1.5rem 0;
}

.pdc-price-alerts__title {
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--color-text, #1f2937);
}

/* ── List ── */

.pdc-price-alerts__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Item (link) ── */

.pdc-price-alerts__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-bg, #fff);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.pdc-price-alerts__item:hover {
    border-color: var(--color-border-dark, #d1d5db);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
    text-decoration: none;
    color: inherit;
}

/* ── Image ── */

.pdc-price-alerts__image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-bg-tertiary, #f3f4f6);
}

.pdc-price-alerts__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdc-price-alerts__no-image {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--color-bg-tertiary, #f3f4f6);
}

/* ── Info ── */

.pdc-price-alerts__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdc-price-alerts__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text, #1f2937);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdc-price-alerts__partner {
    font-size: 0.75rem;
    color: var(--color-text-muted, #9ca3af);
}

/* ── Prices ── */

.pdc-price-alerts__prices {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.pdc-price-alerts__old-price {
    font-size: 0.75rem;
    color: var(--color-text-muted, #9ca3af);
    text-decoration: line-through;
}

.pdc-price-alerts__new-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text, #1f2937);
}

/* ── Badge ── */

.pdc-price-alerts__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.pdc-price-alerts__badge--drop {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success, #10b981);
}

.pdc-price-alerts__badge--rise {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error, #ef4444);
}

/* ── Dark mode ── */

[data-theme="dark"] .pdc-price-alerts__item {
    background: var(--color-bg-secondary, #171717);
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .pdc-price-alerts__item {
        flex-wrap: wrap;
    }

    .pdc-price-alerts__info {
        flex: 1 1 calc(100% - 60px - 4rem);
    }

    .pdc-price-alerts__prices {
        order: 4;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }

    .pdc-price-alerts__badge {
        order: 5;
    }
}
