/**
 * WP Plus - Pro Widgets Stylesheet (Logo Carousel, Advanced Tabs, Counter, Flip Box)
 * Version: 1.0.0
 * Author: WP Plus
 */

/* ==========================================================================
   1. LOGO CAROUSEL WIDGET
   ========================================================================== */
.wp-plus-logo-carousel-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 10px 0;
}

.wp-plus-logo-track {
    display: flex;
    align-items: center;
    gap: 30px;
    width: max-content;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Continuous Infinite Ticker Mode */
.wp-plus-logo-carousel-wrap.ticker-mode .wp-plus-logo-track {
    animation: wpPlusLogoTicker linear infinite;
}

.wp-plus-logo-carousel-wrap.ticker-mode:hover .wp-plus-logo-track {
    animation-play-state: paused;
}

@keyframes wpPlusLogoTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.wp-plus-logo-item {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    transition: all 0.35s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.wp-plus-logo-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 90px;
    width: 100%;
}

.wp-plus-logo-img {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    width: auto;
    object-fit: contain;
    transition: all 0.35s ease;
    display: block;
}

/* Grayscale Effects */
.wp-plus-logo-grayscale-yes .wp-plus-logo-img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.wp-plus-logo-grayscale-yes .wp-plus-logo-item:hover .wp-plus-logo-img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

.wp-plus-logo-grayscale-invert .wp-plus-logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

.wp-plus-logo-grayscale-invert .wp-plus-logo-item:hover .wp-plus-logo-img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.wp-plus-logo-title {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: color 0.2s ease;
}

.wp-plus-logo-item:hover .wp-plus-logo-title {
    color: #6366f1;
}

/* Navigation Arrows */
.wp-plus-logo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
}

.wp-plus-logo-nav-btn:hover {
    background: #6366f1;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.wp-plus-logo-nav-prev { left: 10px; }
.wp-plus-logo-nav-next { right: 10px; }

/* Pagination Dots */
.wp-plus-logo-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.wp-plus-logo-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wp-plus-logo-dot.active {
    background: #6366f1;
    width: 24px;
    border-radius: 999px;
}

/* ==========================================================================
   2. ADVANCED TABS WIDGET
   ========================================================================== */
.wp-plus-adv-tabs {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Layout: Horizontal */
.wp-plus-adv-tabs.layout-horizontal {
    display: flex;
    flex-direction: column;
}

.wp-plus-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    gap: 8px 12px;
}

.wp-plus-tabs-nav.align-center { justify-content: center; }
.wp-plus-tabs-nav.align-left { justify-content: flex-start; }
.wp-plus-tabs-nav.align-right { justify-content: flex-end; }
.wp-plus-tabs-nav.align-justify { justify-content: stretch; }
.wp-plus-tabs-nav.align-justify .wp-plus-tab-item { flex: 1 1 0; text-align: center; }

.wp-plus-tab-item {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.wp-plus-tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

.wp-plus-tab-link:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.wp-plus-tab-item.active .wp-plus-tab-link {
    color: #ffffff;
    background: #6366f1;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.wp-plus-tab-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.wp-plus-tab-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Style Preset: Underline */
.wp-plus-adv-tabs.style-underline .wp-plus-tabs-nav {
    border-bottom: 2px solid #e2e8f0;
    gap: 0 24px;
}
.wp-plus-adv-tabs.style-underline .wp-plus-tab-link {
    background: transparent;
    border-radius: 0;
    padding: 14px 6px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.wp-plus-adv-tabs.style-underline .wp-plus-tab-item.active .wp-plus-tab-link {
    color: #6366f1;
    background: transparent;
    box-shadow: none;
    border-bottom-color: #6366f1;
}

/* Style Preset: Liquid Glass / Glassmorphism */
.wp-plus-adv-tabs.style-glass .wp-plus-tab-link {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.wp-plus-adv-tabs.style-glass .wp-plus-tab-item.active .wp-plus-tab-link {
    background: rgba(99, 102, 241, 0.9);
    border-color: rgba(99, 102, 241, 0.6);
}

/* Layout: Vertical */
.wp-plus-adv-tabs.layout-vertical {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.wp-plus-adv-tabs.layout-vertical .wp-plus-tabs-nav {
    flex-direction: column;
    min-width: 240px;
    margin: 0;
}

.wp-plus-adv-tabs.layout-vertical .wp-plus-tab-link {
    justify-content: flex-start;
    border-radius: 12px;
}

.wp-plus-adv-tabs.layout-vertical.style-underline .wp-plus-tabs-nav {
    border-bottom: none;
    border-right: 2px solid #e2e8f0;
}
.wp-plus-adv-tabs.layout-vertical.style-underline .wp-plus-tab-link {
    border-bottom: none;
    border-right: 2px solid transparent;
    margin-right: -2px;
    margin-bottom: 0;
}
.wp-plus-adv-tabs.layout-vertical.style-underline .wp-plus-tab-item.active .wp-plus-tab-link {
    border-right-color: #6366f1;
}

@media (max-width: 768px) {
    .wp-plus-adv-tabs.layout-vertical {
        flex-direction: column;
    }
    .wp-plus-adv-tabs.layout-vertical .wp-plus-tabs-nav {
        min-width: 100%;
        margin-bottom: 20px;
    }
}

/* Tab Content Area */
.wp-plus-tabs-content-wrap {
    position: relative;
    flex-grow: 1;
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.wp-plus-tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.wp-plus-tab-pane.active {
    display: block;
    opacity: 1;
    animation: wpPlusTabFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wpPlusTabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3. COUNTER WIDGET
   ========================================================================== */
.wp-plus-counter-wrap {
    position: relative;
    display: flex;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.wp-plus-counter-wrap.layout-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wp-plus-counter-wrap.layout-left {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 20px;
}

.wp-plus-counter-wrap.layout-right {
    flex-direction: row-reverse;
    align-items: center;
    text-align: right;
    gap: 20px;
}

.wp-plus-counter-wrap.layout-bottom {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
}

/* Icon / Image */
.wp-plus-counter-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #6366f1;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.wp-plus-counter-wrap:hover .wp-plus-counter-icon-wrap {
    transform: scale(1.12);
}

.wp-plus-counter-icon-wrap img {
    max-width: 64px;
    height: auto;
}

.wp-plus-counter-content-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Number Display */
.wp-plus-counter-number-wrap {
    display: inline-flex;
    align-items: baseline;
    font-size: 46px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    font-family: inherit;
    margin-bottom: 6px;
}

.wp-plus-counter-prefix,
.wp-plus-counter-suffix {
    font-size: 0.65em;
    font-weight: 700;
    color: #6366f1;
}

.wp-plus-counter-prefix { margin-right: 4px; }
.wp-plus-counter-suffix { margin-left: 4px; }

.wp-plus-counter-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
}

.wp-plus-counter-desc {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* ==========================================================================
   4. FLIP BOX WIDGET
   ========================================================================== */
.wp-plus-flip-box-wrap {
    position: relative;
    width: 100%;
    min-height: 320px;
    perspective: 1200px;
    box-sizing: border-box;
}

.wp-plus-flip-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 16px;
}

/* Front & Back Faces */
.wp-plus-flip-box-front,
.wp-plus-flip-box-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: inherit;
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.wp-plus-flip-box-front {
    background: #ffffff;
    z-index: 2;
    transform: rotateY(0deg);
}

.wp-plus-flip-box-back {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    z-index: 1;
}

/* Direction: Flip Left */
.wp-plus-flip-box-wrap.flip-left .wp-plus-flip-box-back {
    transform: rotateY(-180deg);
}
.wp-plus-flip-box-wrap.flip-left:hover .wp-plus-flip-box-inner,
.wp-plus-flip-box-wrap.flip-left.flipped .wp-plus-flip-box-inner {
    transform: rotateY(-180deg);
}

/* Direction: Flip Right */
.wp-plus-flip-box-wrap.flip-right .wp-plus-flip-box-back {
    transform: rotateY(180deg);
}
.wp-plus-flip-box-wrap.flip-right:hover .wp-plus-flip-box-inner,
.wp-plus-flip-box-wrap.flip-right.flipped .wp-plus-flip-box-inner {
    transform: rotateY(180deg);
}

/* Direction: Flip Top */
.wp-plus-flip-box-wrap.flip-top .wp-plus-flip-box-back {
    transform: rotateX(180deg);
}
.wp-plus-flip-box-wrap.flip-top:hover .wp-plus-flip-box-inner,
.wp-plus-flip-box-wrap.flip-top.flipped .wp-plus-flip-box-inner {
    transform: rotateX(180deg);
}

/* Direction: Flip Bottom */
.wp-plus-flip-box-wrap.flip-bottom .wp-plus-flip-box-back {
    transform: rotateX(-180deg);
}
.wp-plus-flip-box-wrap.flip-bottom:hover .wp-plus-flip-box-inner,
.wp-plus-flip-box-wrap.flip-bottom.flipped .wp-plus-flip-box-inner {
    transform: rotateX(-180deg);
}

/* Direction: Zoom In / Fade */
.wp-plus-flip-box-wrap.flip-zoom .wp-plus-flip-box-back {
    transform: scale(0.6);
    opacity: 0;
    transition: all 0.5s ease;
}
.wp-plus-flip-box-wrap.flip-zoom:hover .wp-plus-flip-box-back,
.wp-plus-flip-box-wrap.flip-zoom.flipped .wp-plus-flip-box-back {
    transform: scale(1);
    opacity: 1;
    z-index: 3;
}

/* 3D Depth on Inner Elements */
.wp-plus-flip-box-wrap.depth-3d .wp-plus-flip-box-front > *,
.wp-plus-flip-box-wrap.depth-3d .wp-plus-flip-box-back > * {
    transform: translateZ(50px);
}

/* Content Elements */
.wp-plus-flip-box-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #6366f1;
}

.wp-plus-flip-box-back .wp-plus-flip-box-icon {
    color: #ffffff;
}

.wp-plus-flip-box-icon img {
    max-width: 80px;
    height: auto;
}

.wp-plus-flip-box-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.wp-plus-flip-box-desc {
    margin: 0 0 18px 0;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.95;
}

.wp-plus-flip-box-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    background: #ffffff;
    color: #4f46e5;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.wp-plus-flip-box-btn:hover {
    background: #0f172a;
    color: #ffffff;
    transform: translateY(-2px);
}
