/**
 * PidoGame presentation layer for Pido Account & Rewards.
 * Persistence, AJAX and state remain owned by the plugin.
 */

.pido-product-featured-media {
    position: relative;
    isolation: isolate;
}

.pido-product-featured-media > img {
    display: block;
}

.pido-product-featured-media .pido-single-wishlist {
    position: absolute;
    z-index: 6;
    top: 14px;
    left: 14px;
    right: auto;
    display: block;
    width: auto;
    margin: 0;
}

.pido-product-featured-media .pido-wishlist-toggle.is-single {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 50%;
    color: #26344a;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pido-product-featured-media .pido-wishlist-toggle.is-single:hover,
.pido-product-featured-media .pido-wishlist-toggle.is-single:focus-visible,
.pido-product-featured-media .pido-wishlist-toggle.is-single.is-active {
    color: #e54865;
    border-color: rgba(229, 72, 101, .4);
    background: rgba(255, 248, 250, .96);
}

.pido-product-featured-media .pido-wishlist-toggle.is-single:focus-visible {
    outline: 3px solid rgba(229, 72, 101, .24);
    outline-offset: 3px;
}

.pido-product-featured-media .pido-wishlist-toggle.is-single svg {
    width: 21px;
    height: 21px;
}

.pido-product-featured-media .pido-wishlist-toggle.is-single em {
    position: absolute !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html[data-pido-theme="dark"] .pido-product-featured-media .pido-wishlist-toggle.is-single {
    border-color: rgba(255, 255, 255, .22);
    color: #f4f7fb;
    background: rgba(17, 26, 40, .86);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}

html[data-pido-theme="dark"] .pido-product-featured-media .pido-wishlist-toggle.is-single:hover,
html[data-pido-theme="dark"] .pido-product-featured-media .pido-wishlist-toggle.is-single:focus-visible,
html[data-pido-theme="dark"] .pido-product-featured-media .pido-wishlist-toggle.is-single.is-active {
    color: #ff7189;
    border-color: rgba(255, 113, 137, .44);
    background: rgba(67, 31, 44, .92);
}

.pido-header-rewards-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px 12px 10px;
}

.pido-header-rewards-card {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(var(--pido-primary-rgb, 47, 120, 234), .12);
    border-radius: 12px;
    color: var(--pido-text, #172033) !important;
    background: var(--pido-surface-soft, #f4f6fa);
    background: color-mix(in srgb, var(--pido-surface-soft, #f4f6fa) 94%, var(--pido-primary, #2f78ea) 6%);
    text-decoration: none !important;
    transition: border-color .18s ease, background-color .18s ease;
}

.pido-header-rewards-card:hover,
.pido-header-rewards-card:focus-visible {
    border-color: rgba(var(--pido-primary-rgb, 47, 120, 234), .28);
    background: var(--pido-surface-soft, #eef2f8);
    background: color-mix(in srgb, var(--pido-surface-soft, #f4f6fa) 88%, var(--pido-primary, #2f78ea) 12%);
}

.pido-header-rewards-card:focus-visible {
    outline: 3px solid rgba(var(--pido-primary-rgb, 47, 120, 234), .18);
    outline-offset: 2px;
}

.pido-header-rewards-card__icon {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--pido-primary, #2f78ea);
    background: rgba(var(--pido-primary-rgb, 47, 120, 234), .1);
}

.pido-header-rewards-card--wishlist .pido-header-rewards-card__icon {
    color: #e54865;
    background: rgba(229, 72, 101, .1);
}

.pido-header-rewards-card__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pido-header-rewards-card__label {
    overflow: hidden;
    color: var(--pido-text-muted, #667085);
    font-size: .69rem;
    font-weight: 600;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pido-header-rewards-card strong {
    overflow: hidden;
    color: var(--pido-text, #172033);
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-pido-theme="dark"] .pido-header-rewards-card {
    border-color: rgba(148, 163, 184, .16);
    background: rgba(255, 255, 255, .045);
}

html[data-pido-theme="dark"] .pido-header-rewards-card:hover,
html[data-pido-theme="dark"] .pido-header-rewards-card:focus-visible {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(255, 255, 255, .075);
}

@media (max-width: 767.98px) {
    .pido-product-featured-media .pido-single-wishlist {
        top: 12px;
        left: 12px;
    }

    .pido-product-featured-media .pido-wishlist-toggle.is-single {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pido-header-rewards-card,
    .pido-product-featured-media .pido-wishlist-toggle.is-single {
        transition: none;
    }
}
