/**
 * Tewido Elementor Frontend Styles
 *
 * @package Tewido_Elementor
 */

/* Form Field Icons */
.tewido-field-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

/* ========================================
   Carousel Widget - FOUC Prevention
   ======================================== */

/* Hide carousel until Swiper initializes to prevent Flash of Unstyled Content */
.tewido-carousel {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}

/* Fallback: Show after 2 seconds if JS fails */
.tewido-carousel.swiper-initialized {
    opacity: 1;
    visibility: visible;
}

/* Show in Elementor editor */
.elementor-editor-active .tewido-carousel {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ========================================
   Post Loop Carousel - FOUC Prevention
   ======================================== */

/* Hide post loop carousel until Swiper initializes */
.tewido-post-loop-carousel {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}

/* Fallback: Show after 2 seconds if JS fails */
.tewido-post-loop-carousel.swiper-initialized {
    opacity: 1;
    visibility: visible;
}

/* Show in Elementor editor */
.elementor-editor-active .tewido-post-loop-carousel {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Card clickable area */
.te-carousel-card-link {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

/* Button should be above card link */
.te-carousel-button {
    position: relative;
    z-index: 2;
}

/* Label should be above card link */
.te-carousel-image-wrapper .absolute {
    z-index: 2;
}

/* Navigation arrows - Swiper handles disabled state automatically */
.swiper-button-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}


/* ========================================
   Image Widget Base Styles
   ======================================== */

.tewido-image-widget {
    display: block;
    margin: 0;
}

.tewido-image-wrapper {
    display: inline-block;
    overflow: hidden;
    line-height: 0;
    max-width: 100%;
}

.tewido-image-element {
    display: block;
    width: 100%;
    height: auto;
}

.tewido-image-caption {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.dark .tewido-image-caption {
    color: #9ca3af;
}

.tewido-lightbox-trigger {
    cursor: zoom-in;
}

/* Dark mode image switching */
.tewido-image-light {
    display: block;
}

.tewido-image-dark {
    display: none;
}

.dark .tewido-image-light {
    display: none;
}

.dark .tewido-image-dark {
    display: block;
}


/* ========================================
   Swiper Navigation & Pagination Styling
   ======================================== */

/* Carousel & Post Loop Navigation Arrows */
.tewido-carousel .swiper-button-prev,
.tewido-carousel .swiper-button-next,
.tewido-post-loop-carousel .swiper-button-prev,
.tewido-post-loop-carousel .swiper-button-next {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.tewido-carousel:hover .swiper-button-prev,
.tewido-carousel:hover .swiper-button-next,
.tewido-post-loop-carousel:hover .swiper-button-prev,
.tewido-post-loop-carousel:hover .swiper-button-next {
    opacity: 1;
    pointer-events: auto;
}

.dark .tewido-carousel .swiper-button-prev,
.dark .tewido-carousel .swiper-button-next,
.dark .tewido-post-loop-carousel .swiper-button-prev,
.dark .tewido-post-loop-carousel .swiper-button-next {
    background: rgba(31, 41, 55, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tewido-carousel .swiper-button-prev:hover,
.tewido-carousel .swiper-button-next:hover,
.tewido-post-loop-carousel .swiper-button-prev:hover,
.tewido-post-loop-carousel .swiper-button-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.dark .tewido-carousel .swiper-button-prev:hover,
.dark .tewido-carousel .swiper-button-next:hover,
.dark .tewido-post-loop-carousel .swiper-button-prev:hover,
.dark .tewido-post-loop-carousel .swiper-button-next:hover {
    background: rgba(31, 41, 55, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.tewido-carousel .swiper-button-prev::after,
.tewido-carousel .swiper-button-next::after,
.tewido-post-loop-carousel .swiper-button-prev::after,
.tewido-post-loop-carousel .swiper-button-next::after {
    font-size: 12px;
    font-weight: bold;
    color: #1f2937;
}

.dark .tewido-carousel .swiper-button-prev::after,
.dark .tewido-carousel .swiper-button-next::after,
.dark .tewido-post-loop-carousel .swiper-button-prev::after,
.dark .tewido-post-loop-carousel .swiper-button-next::after {
    color: #f9fafb;
}

/* Pagination Dots - let Elementor controls handle positioning */

.tewido-carousel .swiper-pagination-bullet,
.tewido-post-loop-carousel .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(156, 163, 175, 0.4);
    opacity: 1;
    transition: all 0.3s ease;
}

.dark .tewido-carousel .swiper-pagination-bullet,
.dark .tewido-post-loop-carousel .swiper-pagination-bullet {
    background: rgba(156, 163, 175, 0.4);
}

.tewido-carousel .swiper-pagination-bullet-active,
.tewido-post-loop-carousel .swiper-pagination-bullet-active {
    background: #222;
    width: 32px;
    border-radius: 6px;
}

.dark .tewido-carousel .swiper-pagination-bullet-active,
.dark .tewido-post-loop-carousel .swiper-pagination-bullet-active {
    background: #60a5fa;
}

.tewido-carousel .swiper-pagination-bullet:hover,
.tewido-post-loop-carousel .swiper-pagination-bullet:hover {
    background: rgba(156, 163, 175, 0.6);
}

.dark .tewido-carousel .swiper-pagination-bullet:hover,
.dark .tewido-post-loop-carousel .swiper-pagination-bullet:hover {
    background: rgba(156, 163, 175, 0.6);
}


/* ========================================
   Accordion - Border Color
   ======================================== */

.accordion-border-color {
    border-bottom-color: rgb(229 231 235) !important;
}

.dark .accordion-border-color {
    border-bottom-color: rgb(55 65 81) !important;
}


/* ========================================
   Flip Card - 3D Transform
   ======================================== */

.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

.tewido-flip-card-container:hover .tewido-flip-card {
    transform: rotateY(180deg);
}

.duration-600 {
    transition-duration: 600ms;
}


/* ========================================
   Animated Headline
   ======================================== */

.tewido-animated-headline {
    display: block;
}

.tewido-animated-text-wrapper {
    display: inline-block;
    position: relative;
}

.tewido-animated-text {
    display: inline-block;
    min-width: 1ch;
}

/* Typing cursor */
.tewido-cursor {
    display: inline-block;
    margin-inline-start: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}


/* ========================================
   Highlighted Heading
   ======================================== */

.tewido-highlighted-text {
    position: relative;
    display: inline-block;
    padding: 0 0.15em;
    z-index: 1;
}

.tewido-highlighted-content {
    position: relative;
    z-index: 2;
}

.tewido-highlight-svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    width: 105%;
    height: 120%;
    pointer-events: none;
    z-index: -1;
}

[dir="rtl"] .tewido-highlight-svg {
    transform: translate(50%, -50%);
}

/* Custom uploaded SVG */
.tewido-custom-svg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* ========================================
   Post Loop Grid & Carousel
   ======================================== */

/* Grid layout - ensure proper display and prevent overflow */
.tewido-post-loop {
    display: grid;
    width: 100%;
}

.tewido-post-loop > * {
    min-width: 0; /* Prevent grid blowout on mobile */
}

/* Make sure card takes full height in carousel */
.tewido-post-loop-carousel .swiper-slide {
    height: auto;
}

.tewido-post-loop-carousel .swiper-slide>* {
    height: 100%;
}

/* ========================================
   Text Marquee
   ======================================== */

/* Multiple rows wrapper */
.tewido-marquee-multi-wrapper {
    width: 100%;
}

.tewido-marquee-row {
    width: 100%;
}

/* Single marquee wrapper */
.tewido-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.tewido-marquee-container {
    display: flex;
    width: max-content;
    will-change: transform;
}

.tewido-marquee-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.tewido-marquee-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tewido-marquee-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tewido-marquee-icon img,
.tewido-marquee-icon svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.tewido-marquee-text {
    white-space: nowrap;
}

/* Smooth animation */
.tewido-marquee-wrapper:hover .tewido-marquee-container {
    transition: transform 0.3s ease;
}

/* ========================================
   Video Tabs - Hide Scrollbar
   ======================================== */

/* Hide scrollbar for Chrome, Safari and Opera */
.tewido-tabs-nav::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.tewido-tabs-nav {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

/* Ensure scrolling works on touch devices */
.tewido-tabs-nav {
    overflow-x: auto;
    overflow-y: hidden;
}

/* ========================================
   Features Widget - Hide Scrollbar
   ======================================== */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}


/* ========================================
   Taxonomy Filter Posts - Sticky Tabs
   ======================================== */

/* Sticky wrapper enhancements */
.taxonomy-filter-tabs-wrapper.sticky {
    transition: box-shadow 0.3s ease;
    padding-bottom: 0.5rem;
}

/* Add shadow when sticky (triggered via JS) */
.taxonomy-filter-tabs-wrapper.sticky.is-stuck {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .taxonomy-filter-tabs-wrapper.sticky.is-stuck {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Taxonomy Filter Tabs - Hide Scrollbar */
.taxonomy-filter-tabs::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.taxonomy-filter-tabs {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

/* Ensure scrolling works on touch devices */
.taxonomy-filter-tabs {
    overflow-x: auto;
    overflow-y: hidden;
}

/* Tab scroll indicators - Hidden by default, shown on hover */
.tab-scroll-indicators {
    position: relative;
    pointer-events: none;
}

.scroll-indicator-left,
.scroll-indicator-right {
    position: absolute;
    top: -60px;
    width: 80px;
    height: 60px;
    pointer-events: none;
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show indicators on hover */
.taxonomy-filter-tabs-wrapper:hover .scroll-indicator-left:not(.hidden),
.taxonomy-filter-tabs-wrapper:hover .scroll-indicator-right:not(.hidden) {
    opacity: 1;
}

.scroll-indicator-left {
    inset-inline-start: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
}

[dir="rtl"] .scroll-indicator-left {
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
}

.scroll-indicator-right {
    inset-inline-end: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
}

[dir="rtl"] .scroll-indicator-right {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
}

.dark .scroll-indicator-left {
    background: linear-gradient(to right, rgba(17, 24, 39, 0.95), transparent);
}

.dark .scroll-indicator-right {
    background: linear-gradient(to left, rgba(17, 24, 39, 0.95), transparent);
}

/* Results counter */
.results-counter {
    font-weight: 500;
}

/* Skeleton loading animation */
@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.skeleton-card {
    animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Post card animations */
.post-card {
    will-change: opacity, transform;
}

/* Empty state styling */
.empty-state {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state svg {
    opacity: 0.6;
}

/* Smooth transitions for grid */
.taxonomy-filter-posts-grid {
    transition: opacity 0.3s ease;
}

/* ========================================
   Taxonomy Filter Posts - New Features
   ======================================== */

/* Search box styling */
.search-posts-input {
    transition: all 0.3s ease;
}

.search-posts-input:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .search-posts-input:focus {
    border-color: rgb(96 165 250);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Sort dropdown styling */
.sort-posts-select {
    transition: all 0.3s ease;
}

.sort-posts-select:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .sort-posts-select:focus {
    border-color: rgb(96 165 250);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Layout toggle buttons */
.layout-toggle-btn {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    background-color: rgb(243 244 246);
    color: rgb(107 114 128);
    border: 2px solid transparent;
}

.dark .layout-toggle-btn {
    background-color: rgb(55 65 81);
    color: rgb(156 163 175);
}

.layout-toggle-btn:hover {
    background-color: rgb(229 231 235);
}

.dark .layout-toggle-btn:hover {
    background-color: rgb(75 85 99);
}

.layout-toggle-btn.active {
    background-color: rgb(59 130 246);
    color: white;
    border-color: rgb(37 99 235);
}

.dark .layout-toggle-btn.active {
    background-color: rgb(96 165 250);
    border-color: rgb(59 130 246);
}

.layout-toggle-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

/* Active filter badge */
.active-filters-badge {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clear-filter-btn {
    transition: all 0.2s ease;
}

.clear-filter-btn:hover {
    background-color: rgb(220 38 38);
    transform: scale(1.1);
    color: #fff;
}

.dark .clear-filter-btn:hover {
    background-color: rgb(239 68 68);
}

/* List layout styles */
.layout-list .post-card {
    flex-direction: row;
    max-width: 100%;
}

.layout-list .post-card>div:first-child {
    width: 300px;
    flex-shrink: 0;
}

.layout-list .post-card>div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .layout-list .post-card {
        flex-direction: column;
    }

    .layout-list .post-card>div:first-child {
        width: 100%;
    }
}

/* Masonry grid layout */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.masonry-grid .post-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        column-count: 1;
    }
}


/* Loading indicators */

/* Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Progress bar */
@keyframes progress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.animate-progress {
    animation: progress 1.5s ease-in-out infinite;
}

/* Bouncing dots */
@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.bounce-dot:nth-child(1) {
    animation: bounce 1.4s infinite ease-in-out both;
    animation-delay: -0.32s;
}

.bounce-dot:nth-child(2) {
    animation: bounce 1.4s infinite ease-in-out both;
    animation-delay: -0.16s;
}

.bounce-dot:nth-child(3) {
    animation: bounce 1.4s infinite ease-in-out both;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .layout-toggle-btn {
        padding: 0.375rem;
    }

    .layout-toggle-btn svg {
        width: 1rem;
        height: 1rem;
    }

    .search-posts-input {
        font-size: 0.875rem;
    }

    .sort-posts-select {
        font-size: 0.875rem;
    }
}

/* ============================================
   Countdown Timer Widget Styles
   ============================================ */

/* Timer container */
.tewido-countdown-timer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Individual countdown item */
.tewido-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Countdown number */
.tewido-countdown-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    display: block;
}

/* Countdown label */
.tewido-countdown-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

/* Separator between items */
.tewido-countdown-separator {
    font-size: 2rem;
    font-weight: 600;
    align-self: center;
    line-height: 1;
    margin-top: -1rem;
}

/* Expired message */
.tewido-countdown-expired {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 2rem;
}

/* Pulse animation for number updates */
@keyframes countdown-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.tewido-countdown-pulse {
    animation: countdown-pulse 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tewido-countdown-number {
        font-size: 2rem;
    }

    .tewido-countdown-label {
        font-size: 0.75rem;
    }

    .tewido-countdown-separator {
        font-size: 1.5rem;
    }

    .tewido-countdown-expired {
        font-size: 1.25rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tewido-countdown-number {
        font-size: 1.5rem;
    }

    .tewido-countdown-label {
        font-size: 0.625rem;
    }

    .tewido-countdown-separator {
        font-size: 1.25rem;
    }

    .tewido-countdown-expired {
        font-size: 1rem;
        padding: 1rem;
    }
}

/* ============================================
   Gallery Widget Styles (Tailwind-based)
   ============================================ */

/* Gallery grid container - dynamic columns via JS */
.te-gallery-grid {
    display: grid;
    gap: 1.25rem;
    width: 100%;
}

/* Masonry layout using CSS columns */
.te-gallery-grid.te-masonry {
    display: block;
    column-gap: 1.25rem;
}

.te-gallery-grid.te-masonry .te-gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.25rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

/* Fade in animation for new items */
@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gallery uses Elementor's native lightbox */

.dark .te-load-more-btn:disabled {
    background-color: rgb(75 85 99) !important;
    color: white !important;
}

/* Button spinner */
.te-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: te-spin 0.6s linear infinite;
    margin-inline-end: 0.5rem;
}

.te-load-more-btn:not(.loading) .te-btn-spinner {
    display: none;
}

/* ========================================
   Flex Slider Widget
   ======================================== */

/* Main slider container */
.te-flex-slider {
    position: relative;
    width: 100%;
}

.te-flex-slider .swiper-slide {
    position: relative;
    overflow: hidden;
}

/* Navigation arrows styling */
.te-flex-slider .swiper-button-prev,
.te-flex-slider .swiper-button-next {
    transition: all 0.3s ease;
}


/* Pagination styling */
.te-flex-slider .swiper-pagination {
    bottom: 20px;
}

.te-flex-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.te-flex-slider .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* Pagination: Lines (Pills) */
.te-flex-slider .te-pagination-bullets-line .swiper-pagination-bullet {
    width: 24px;
    height: 4px;
    border-radius: 2px;
}

.te-flex-slider .te-pagination-bullets-line .swiper-pagination-bullet-active {
    width: 40px;
    transform: scale(1);
}

/* Pagination: Squares */
.te-flex-slider .te-pagination-bullets-square .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.te-flex-slider .te-pagination-bullets-square .swiper-pagination-bullet-active {
    transform: scale(1);
}

/* Pagination: Dashes */
.te-flex-slider .te-pagination-bullets-dash .swiper-pagination-bullet {
    width: 16px;
    height: 3px;
    border-radius: 0;
}

.te-flex-slider .te-pagination-bullets-dash .swiper-pagination-bullet-active {
    width: 32px;
    transform: scale(1);
}

/* Pagination: Numbers */
.te-flex-slider .te-pagination-bullets-number .swiper-pagination-bullet {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.6;
}

.te-flex-slider .te-pagination-bullets-number .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.15);
}

/* Scrollbar */
.te-flex-slider .swiper-scrollbar {
    position: absolute;
    bottom: 10px;
    inset-inline-start: 5%;
    width: 90%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.te-flex-slider .swiper-scrollbar-drag {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    cursor: grab;
}

.te-flex-slider .swiper-scrollbar-drag:active {
    cursor: grabbing;
}

/* Progress bar pagination */
.te-flex-slider .swiper-pagination-progressbar {
    height: 4px;
}

.te-flex-slider .swiper-pagination-progressbar.te-progressbar-bottom {
    bottom: 0;
    top: auto;
}

.te-flex-slider .swiper-pagination-progressbar.te-progressbar-top {
    top: 0;
    bottom: auto;
}

/* Arrow transitions */
.te-flex-slider .swiper-button-prev,
.te-flex-slider .swiper-button-next {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide controls in Elementor editor preview */
.elementor-editor-active .te-flex-slider .swiper-button-prev,
.elementor-editor-active .te-flex-slider .swiper-button-next {
    display: flex;
}

/* ========================================
   Arrow Layout Positions
   ======================================== */

/* Arrow wrapper base - hidden until JS initializes to prevent FOUC */
.te-flex-arrows {
    z-index: 10;
    pointer-events: none;
    visibility: hidden;
}

.te-flex-arrows.te-arrows-ready {
    visibility: visible;
}

.te-flex-arrows .swiper-button-prev,
.te-flex-arrows .swiper-button-next {
    pointer-events: auto;
    margin: 0;
}

/* Grouped layouts base - for when arrows are together */
.te-flex-arrows.te-arrows-grouped {
    display: flex;
    align-items: center;
}

/* ===========================================
   Arrow Layout Classes (JS controlled)
   =========================================== */

/* Sides layout - arrows on left and right */
.te-flex-arrows.te-arrows-sides {
    position: static;
    display: block;
}
.te-flex-arrows.te-arrows-sides .swiper-button-prev,
.te-flex-arrows.te-arrows-sides .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.te-flex-arrows.te-arrows-sides .swiper-button-prev {
    inset-inline-start: 20px;
    inset-inline-end: auto;
}
.te-flex-arrows.te-arrows-sides .swiper-button-next {
    inset-inline-end: 20px;
    inset-inline-start: auto;
}

/* Grouped layouts - both arrows together */
.te-flex-arrows.te-arrows-bottom-center,
.te-flex-arrows.te-arrows-bottom-left,
.te-flex-arrows.te-arrows-bottom-right,
.te-flex-arrows.te-arrows-top-center,
.te-flex-arrows.te-arrows-top-left,
.te-flex-arrows.te-arrows-top-right {
    position: absolute;
    display: flex;
}
.te-flex-arrows.te-arrows-bottom-center .swiper-button-prev,
.te-flex-arrows.te-arrows-bottom-center .swiper-button-next,
.te-flex-arrows.te-arrows-bottom-left .swiper-button-prev,
.te-flex-arrows.te-arrows-bottom-left .swiper-button-next,
.te-flex-arrows.te-arrows-bottom-right .swiper-button-prev,
.te-flex-arrows.te-arrows-bottom-right .swiper-button-next,
.te-flex-arrows.te-arrows-top-center .swiper-button-prev,
.te-flex-arrows.te-arrows-top-center .swiper-button-next,
.te-flex-arrows.te-arrows-top-left .swiper-button-prev,
.te-flex-arrows.te-arrows-top-left .swiper-button-next,
.te-flex-arrows.te-arrows-top-right .swiper-button-prev,
.te-flex-arrows.te-arrows-top-right .swiper-button-next {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
}

/* Bottom center */
.te-flex-arrows.te-arrows-bottom-center {
    bottom: 20px;
    top: auto;
    inset-inline-start: 50%;
    inset-inline-end: auto;
    transform: translateX(-50%);
}
[dir="rtl"] .te-flex-arrows.te-arrows-bottom-center {
    transform: translateX(50%);
}
/* Bottom start */
.te-flex-arrows.te-arrows-bottom-left {
    bottom: 20px;
    top: auto;
    inset-inline-start: 20px;
    inset-inline-end: auto;
    transform: none;
}
/* Bottom end */
.te-flex-arrows.te-arrows-bottom-right {
    bottom: 20px;
    top: auto;
    inset-inline-end: 20px;
    inset-inline-start: auto;
    transform: none;
}
/* Top center */
.te-flex-arrows.te-arrows-top-center {
    top: 20px;
    bottom: auto;
    inset-inline-start: 50%;
    inset-inline-end: auto;
    transform: translateX(-50%);
}
[dir="rtl"] .te-flex-arrows.te-arrows-top-center {
    transform: translateX(50%);
}
/* Top start */
.te-flex-arrows.te-arrows-top-left {
    top: 20px;
    bottom: auto;
    inset-inline-start: 20px;
    inset-inline-end: auto;
    transform: none;
}
/* Top end */
.te-flex-arrows.te-arrows-top-right {
    top: 20px;
    bottom: auto;
    inset-inline-end: 20px;
    inset-inline-start: auto;
    transform: none;
}

/* Thumbnail Slider */
.te-flex-slider-thumbs {
    margin-top: 10px;
    padding: 5px 0;
}

.te-flex-slider-thumbs .swiper-slide {
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.te-flex-slider-thumbs .swiper-slide:hover {
    opacity: 0.9;
}

.te-flex-slider-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    transform: scale(1.05);
}

.te-flex-slider-thumbs .te-thumb-slide {
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.1);
}

.te-flex-slider-thumbs .te-thumb-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.te-flex-slider-thumbs .te-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

/* Lazy Loading */
.te-flex-slider .swiper-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.te-flex-slider .swiper-lazy-loaded {
    opacity: 1;
}

.te-flex-slider .swiper-lazy-preloader {
    position: absolute;
    inset-inline-start: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-inline-start: -20px;
    margin-top: -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: te-spin 1s linear infinite;
}

@keyframes te-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SCF Widgets - Empty Message
   ======================================== */

.tewido-acf-text-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: rgb(107 114 128);
    background-color: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.dark .tewido-acf-text-empty {
    color: rgb(156 163 175);
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}