/**
 * Price Widget Carousel — Frontend Styles
 *
 * @package PWFC
 */

/* ── Wrapper ── */
.pwfc-carousel-wrapper {
    position: relative;
    margin: 0 auto;
    padding: 0 48px 20px;
}

/* ── Tab Rows — reuses widget tab pattern ── */
.pwfc-carousel-tabs {
    display: flex;
    width: fit-content;
    gap: 4px;
    background: var(--pwfc-tab-bg, #f3f4f6);
    border-radius: 8px;
    padding: 4px;
    margin: 0 auto 12px;
    min-height: 40px;
}

.pwfc-carousel-tab {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pwfc-text-secondary, #6b7280);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.pwfc-carousel-tab:hover {
    color: var(--pwfc-text, #1f2937);
}

.pwfc-carousel-tab.active {
    color: var(--pwfc-text, #1f2937);
    background: var(--pwfc-tab-active-bg, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ── Dark Mode ── */
/* Variables inherited from :root html.dark in widget.css */

/* ── Swiper Container ── */
.pwfc-carousel {
    position: relative;
    overflow: hidden;
    padding: 10px 0 40px;
}

.pwfc-carousel .swiper-slide {
    display: flex;
    justify-content: center;
    height: auto;
    box-sizing: border-box;
}

/* Hidden slides (filtered out) */
.pwfc-carousel .swiper-slide.pwfc-slide-hidden {
    display: none;
}

/* ── Card ── */
.pwfc-carousel-card {
    display: flex;
    flex-direction: column;
    width: fit-content;
    background: var(--pwfc-card-bg);
    border: 1px solid var(--pwfc-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    zoom: var(--pwfc-card-zoom, 0.8);
}

.pwfc-carousel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pwfc-carousel-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px 8px;
    gap: 6px;
}

.pwfc-carousel-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pwfc-text);
    text-align: center;
}


/* ── Compact widget inside carousel card ── */
.pwfc-carousel-card .pwfc-pricing-widget {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding-top: 0;
}

/* Hide product name inside carousel (header shows it) */
.pwfc-carousel-card .pwfc-pricing-widget-product-name {
    display: none;
}

/* Compact widget tabs: always wrap inside carousel cards (narrow at all viewports) */
.pwfc-carousel-card .pwfc-pricing-tabs {
    width: 100%;
    flex-wrap: wrap;
}

.pwfc-carousel-card .pwfc-pricing-tab {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* ── Navigation Arrows (children of wrapper, outside Swiper) ── */
.pwfc-carousel-wrapper > .swiper-button-prev,
.pwfc-carousel-wrapper > .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: var(--pwfc-accent);
    width: 36px;
    height: 36px;
    background: var(--pwfc-card-bg);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.pwfc-carousel-wrapper > .swiper-button-prev {
    left: 6px;
}

.pwfc-carousel-wrapper > .swiper-button-next {
    right: 6px;
}

.pwfc-carousel-wrapper > .swiper-button-prev::after,
.pwfc-carousel-wrapper > .swiper-button-next::after {
    font-size: 16px;
    font-weight: bold;
}

.pwfc-carousel-wrapper > .swiper-button-prev:hover,
.pwfc-carousel-wrapper > .swiper-button-next:hover {
    background: var(--pwfc-card-bg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.pwfc-carousel-wrapper > .swiper-button-disabled {
    opacity: 1;
    color: var(--pwfc-text-secondary);
    background: var(--pwfc-tab-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ── Swiper Pagination ── */
.pwfc-carousel .swiper-pagination {
    bottom: 4px;
}

.pwfc-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--pwfc-text-secondary);
    opacity: 0.5;
}

.pwfc-carousel .swiper-pagination-bullet-active {
    background: var(--pwfc-accent);
    opacity: 1;
}

/* ── Empty State ── */
.pwfc-carousel-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--pwfc-text-secondary);
    font-size: 14px;
    font-style: italic;
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 1024px) {
    .pwfc-carousel-wrapper > .swiper-button-prev,
    .pwfc-carousel-wrapper > .swiper-button-next {
        width: 32px;
        height: 32px;
    }

    .pwfc-carousel-wrapper > .swiper-button-prev::after,
    .pwfc-carousel-wrapper > .swiper-button-next::after {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .pwfc-carousel-tabs {
        flex-wrap: wrap;
    }

    .pwfc-carousel-tab {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .pwfc-carousel-card-header {
        padding: 10px 12px 6px;
    }

    .pwfc-carousel-card-title {
        font-size: 14px;
    }

    .pwfc-carousel-learn-more {
        font-size: 12px;
    }
}

/* Very small screens — hide arrows and reclaim padding */
@media (max-width: 479px) {
    .pwfc-carousel-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .pwfc-carousel-wrapper > .swiper-button-prev,
    .pwfc-carousel-wrapper > .swiper-button-next {
        display: none;
    }
}
