/*
 * Rain Spree — Uniform Archive Category Tabs
 * Applies to Digital Products, Wellness Essentials and Print On Demand.
 */

.rs-digital-categories,
.rs-wellness-category-scroll,
.rs-pod-categories {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

/* Desktop/tablet: automatically fit every category + View All. */
@media (min-width: 701px) {

    .rs-digital-categories,
    .rs-wellness-category-scroll,
    .rs-pod-categories {
        justify-content: space-between;
    }

    .rs-digital-categories > a.rs-digital-category,
    .rs-wellness-category-scroll > a.rs-wellness-category-pill,
    .rs-pod-categories > a.rs-pod-category {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        box-sizing: border-box;
        justify-content: center;
        overflow: hidden;
    }

    .rs-digital-categories > a.rs-digital-category > span:last-child,
    .rs-wellness-category-scroll > a.rs-wellness-category-pill > span:last-child,
    .rs-pod-categories > a.rs-pod-category > span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rs-digital-categories > a.rs-digital-category,
    .rs-wellness-category-scroll > a.rs-wellness-category-pill,
    .rs-pod-categories > a.rs-pod-category {
        font-size: clamp(9px, 0.72vw, 12px);
        padding-left: 9px;
        padding-right: 9px;
    }

    /* View All always reserves its own space. */
    .rs-digital-view-all-wrap,
    .rs-wellness-view-all-wrap,
    .rs-pod-view-all-wrap {
        flex: 0 0 clamp(82px, 9vw, 110px);
        min-width: 82px;
        display: flex;
    }

    .rs-digital-view-all,
    .rs-wellness-view-all,
    .rs-pod-view-all {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
    }
}

/* Mobile: allow horizontal scrolling instead of making text microscopic. */
@media (max-width: 700px) {

    .rs-digital-categories,
    .rs-wellness-category-scroll,
    .rs-pod-categories {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .rs-digital-categories::-webkit-scrollbar,
    .rs-wellness-category-scroll::-webkit-scrollbar,
    .rs-pod-categories::-webkit-scrollbar {
        display: none;
    }

    .rs-digital-categories > a.rs-digital-category,
    .rs-wellness-category-scroll > a.rs-wellness-category-pill,
    .rs-pod-categories > a.rs-pod-category {
        flex: 0 0 auto;
        max-width: none;
    }

    .rs-digital-view-all-wrap,
    .rs-wellness-view-all-wrap,
    .rs-pod-view-all-wrap {
        flex: 0 0 auto;
        display: flex;
    }
}

/* ---------------------------------------------------------
   Common compact pill sizing
   --------------------------------------------------------- */

@media (min-width: 701px) {

    .rs-wellness-category-scroll > a.rs-wellness-category-pill,
    .rs-pod-categories > a.rs-pod-category {
        min-height: 38px;
        padding-top: 0;
        padding-bottom: 0;
        border-radius: 999px;
        line-height: 1;
    }

    .rs-wellness-category-scroll > a.rs-wellness-category-pill .rs-wellness-category-icon,
    .rs-pod-categories > a.rs-pod-category .rs-pod-category-icon {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
    }

    .rs-digital-view-all,
    .rs-wellness-view-all,
    .rs-pod-view-all {
        min-height: 38px;
        padding: 0 10px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border-radius: 999px;
        text-decoration: none;
        font-size: clamp(9px, 0.72vw, 12px);
        font-weight: 600;
        line-height: 1;
    }

    .rs-wellness-view-all {
        border: 1px solid rgba(36,107,53,.12);
        background: #fff;
        color: #435349;
    }

    .rs-wellness-view-all:hover {
        border-color: rgba(36,107,53,.28);
        color: var(--wellness-green, #246b35);
    }

    .rs-pod-view-all {
        border: 1px solid rgba(233,103,23,.16);
        background: #fff;
        color: #4f4a46;
    }

    .rs-pod-view-all:hover {
        border-color: rgba(233,103,23,.35);
        color: #e96717;
    }
}

/* Digital's View All uses its existing purple theme. */
.rs-digital-view-all {
    border: 1px solid var(--digital-border, #e4d5f8);
    background: #fff;
    color: var(--digital-text, #342d46);
}

.rs-digital-view-all:hover {
    border-color: var(--digital-purple, #7040b8);
    color: var(--digital-purple, #7040b8);
}

@media (max-width: 700px) {

    .rs-wellness-category-scroll > a.rs-wellness-category-pill,
    .rs-pod-categories > a.rs-pod-category,
    .rs-digital-categories > a.rs-digital-category {
        min-height: 38px;
    }

    .rs-wellness-view-all,
    .rs-pod-view-all,
    .rs-digital-view-all {
        min-height: 38px;
        padding: 0 13px;
    }
}