/* A quiet, single-purpose surface for SliceWP's dedicated affiliate portal. */
body.pepstore-slicewp-portal .entry-header,
body.pepstore-slicewp-portal .ct-page-title,
body.pepstore-slicewp-portal .wp-block-post-title,
body.pepstore-slicewp-portal .page-title,
body.pepstore-slicewp-portal .slicewp-affiliate-account > h1:first-child {
    display: none !important;
}

body.pepstore-slicewp-portal .entry-content {
    max-width: 1120px;
    margin: 0 auto;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account {
    margin-top: 18px;
}

.pepstore-affiliate-summary {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    gap: 14px;
    align-items: stretch;
    margin: 0 0 18px;
}
.pepstore-affiliate-summary__earnings,
.pepstore-affiliate-summary__share,
.pepstore-affiliate-summary__code {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5ddea;
    border-radius: 14px;
    background: #fff;
}
.pepstore-affiliate-summary__earnings > div { min-width: 86px; }
.pepstore-affiliate-summary__available {
    min-width: 132px;
    padding: 14px 17px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d3d9a, #8f59bc);
    box-shadow: 0 8px 18px rgba(109, 61, 154, .22);
}
.pepstore-affiliate-summary__available span,
.pepstore-affiliate-summary__available strong { color: #fff !important; }
.pepstore-affiliate-summary__available strong { display: block; margin-top: 5px; font-size: 25px; line-height: 1; }
.pepstore-affiliate-summary__pending { min-width: 105px; padding: 14px 4px; }
.pepstore-affiliate-summary__pending strong { display: block; margin-top: 5px; font-size: 18px; }
.pepstore-affiliate-summary span {
    display: block;
    color: #776986;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.pepstore-affiliate-summary strong { color: #29233a; font-size: 17px; }
.pepstore-affiliate-summary__share { display: block; min-width: 0; }
.pepstore-affiliate-summary__share > div { display: flex; gap: 8px; margin-top: 7px; }
.pepstore-affiliate-summary input { min-width: 0; flex: 1; height: 38px; margin: 0; padding: 0 10px; border: 1px solid #ded5e6; border-radius: 8px; }
.pepstore-affiliate-summary .button { min-height: 38px !important; padding: 0 12px !important; }
.pepstore-affiliate-summary__code { flex-wrap: wrap; min-width: 170px; }
.pepstore-affiliate-summary__code span { width: 100%; }

@media (max-width: 820px) {
    .pepstore-affiliate-summary { grid-template-columns: 1fr; }
    .pepstore-affiliate-summary__earnings { justify-content: space-between; padding: 12px; }
    .pepstore-affiliate-summary__available { flex: 1; min-width: 0; }
    .pepstore-affiliate-summary__pending { min-width: 102px; padding-left: 10px; }
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 0 0 24px;
    padding: 6px;
    border: 1px solid #e5ddea;
    border-radius: 14px;
    background: #fff;
    scrollbar-width: thin;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-nav-tab {
    flex: 0 0 auto;
    margin: 0;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-nav-tab a {
    display: block;
    padding: 10px 12px;
    border: 0 !important;
    border-radius: 9px;
    color: #655577;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-nav-tab.slicewp-active a,
body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-nav-tab a:hover {
    background: #f2eafb;
    color: #6d3d9a;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-tab {
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid #e5ddea;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(42, 24, 61, .04);
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-tab h2,
body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-tab h3 {
    margin-top: 0;
    color: #242038;
}

/* The custom panel is injected after SliceWP's native tab markup. */
body.pepstore-slicewp-portal .slicewp-tab[data-slicewp-tab="discount-code"].slicewp-active {
    display: block !important;
}

body.pepstore-slicewp-portal .pepstore-affiliate-coupon-manager {
    display: block;
    max-width: 560px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.pepstore-affiliate-toast {
    position: fixed;
    z-index: 10000;
    right: 22px;
    bottom: 22px;
    max-width: min(360px, calc(100vw - 44px));
    padding: 14px 18px;
    border-radius: 12px;
    background: #2c7049;
    box-shadow: 0 12px 30px rgba(22, 66, 43, .24);
    color: #fff;
    font-weight: 700;
    transition: opacity .2s ease;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account input,
body.pepstore-slicewp-portal .slicewp-affiliate-account select {
    min-height: 44px;
    border: 1px solid #dcd3e5;
    border-radius: 9px;
    background: #fff;
}

body.pepstore-slicewp-portal .slicewp-affiliate-account .button,
body.pepstore-slicewp-portal .slicewp-affiliate-account button,
body.pepstore-slicewp-portal .slicewp-affiliate-account input[type="submit"] {
    min-height: 44px;
    padding: 0 17px;
    border: 0;
    border-radius: 9px;
    background: #7540a4;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 700px) {
    body.pepstore-slicewp-portal .slicewp-affiliate-account { margin-top: 18px; }
    body.pepstore-slicewp-portal .slicewp-affiliate-account .slicewp-tab { padding: 20px; }
}
