/* =========================================================================
   Content components — accordion, carousel, tabs
   Enqueued on demand by rcc_enqueue_component_assets().
   Uses existing theme tokens (--brand-1, --light, --light-dark, --light-light,
   --special-font-family) with safe fallbacks.
   ========================================================================= */

/* ---- Accordion ---------------------------------------------------------- */
.rcc-accordion {
    margin: 2rem 0;
    max-width: var(--blogWidth, 730px);
}
.rcc-accordion-panel {
    border: 2px solid var(--light-dark, #ddd);
    border-radius: .75rem;
    margin-bottom: .75rem;
    background: #fff;
    overflow: hidden;
}
.rcc-accordion-summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.25rem;
    font-family: var(--special-font-family, inherit);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-1, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.rcc-accordion-summary::-webkit-details-marker { display: none; }
.rcc-accordion-summary::after {
    content: "＋";
    font-weight: 400;
    transition: transform .2s ease;
    flex: 0 0 auto;
}
.rcc-accordion-panel[open] > .rcc-accordion-summary::after { content: "－"; }
.rcc-accordion-summary:hover { background: var(--light-light, #f5f5f5); }
.rcc-accordion-summary:focus-visible { outline: 2px solid var(--brand-1, #1a1a1a); outline-offset: -2px; }
.rcc-accordion-body {
    padding: 0 1.25rem 1.25rem 1.25rem;
    line-height: 1.6;
}
.rcc-accordion-body > :first-child { margin-top: 0; }
.rcc-accordion-body img { max-width: 100%; height: auto; }

/* ---- Carousel ----------------------------------------------------------- */
.rcc-carousel {
    position: relative;
    margin: 2rem 0;
    max-width: var(--blogWidth, 730px);
}
.rcc-carousel-track {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: .75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rcc-carousel-track::-webkit-scrollbar { display: none; }
.rcc-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    min-width: 0;
}
.rcc-carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: .75rem;
}
.rcc-carousel-slide > :first-child { margin-top: 0; }
.rcc-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rcc-carousel-nav:hover { background: rgba(0, 0, 0, .8); }
.rcc-carousel-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rcc-carousel-prev { left: .5rem; }
.rcc-carousel-next { right: .5rem; }
.rcc-carousel-nav[hidden] { display: none; }
.rcc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .75rem;
}
.rcc-carousel-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--light-dark, #ccc);
    cursor: pointer;
}
.rcc-carousel-dot[aria-current="true"] { background: var(--brand-1, #1a1a1a); }
.rcc-carousel-dot:focus-visible { outline: 2px solid var(--brand-1, #1a1a1a); outline-offset: 2px; }

/* ---- Tabs --------------------------------------------------------------- */
.rcc-tabs {
    margin: 2rem 0;
    max-width: var(--blogWidth, 730px);
}
.rcc-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    border-bottom: 2px solid var(--light-dark, #ddd);
}
.rcc-tab {
    border: none;
    background: transparent;
    padding: .75rem 1.25rem;
    font-family: var(--special-font-family, inherit);
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark, #444);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.rcc-tab:hover { color: var(--brand-1, #1a1a1a); }
.rcc-tab[aria-selected="true"] {
    color: var(--brand-1, #1a1a1a);
    border-bottom-color: var(--brand-1, #1a1a1a);
}
.rcc-tab:focus-visible { outline: 2px solid var(--brand-1, #1a1a1a); outline-offset: -2px; }
.rcc-tab-panels { padding-top: 1.25rem; line-height: 1.6; }
.rcc-tab-panel[hidden] { display: none; }
.rcc-tab-panel > :first-child { margin-top: 0; }
.rcc-tab-panel img { max-width: 100%; height: auto; }

@media only screen and (max-width: 48em) {
    .rcc-tablist { overflow-x: auto; flex-wrap: nowrap; }
    .rcc-tab { white-space: nowrap; }
}
