/**
 * Template Carousel for Elementor - Frontend & Editor Styles
 * Isolated & Lightweight CSS with Full Theme Defense
 */
:root {
  --tcfe-transition-duration: 500ms;
  --tcfe-transition-easing: cubic-bezier(0.25, 1, 0.5, 1);
}

.tcfe-carousel-container {
  position: relative !important;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background-clip: padding-box;
}

.tcfe-carousel-container *,
.tcfe-carousel-container *::before,
.tcfe-carousel-container *::after {
  box-sizing: border-box;
}

.tcfe-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.tcfe-carousel-track {
  display: flex;
  width: 100%;
  position: relative;
  transition: transform var(--tcfe-transition-duration) var(--tcfe-transition-easing);
  will-change: transform;
}

.tcfe-carousel-track.is-dragging {
  transition: none !important;
  cursor: grabbing;
}

.tcfe-slide {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
  box-sizing: border-box;
  min-height: 200px;
}

.tcfe-slide-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

/* FADE ANIMATION */
.tcfe-carousel-container.tcfe-anim-fade .tcfe-carousel-track {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  transform: none !important;
}

.tcfe-carousel-container.tcfe-anim-fade .tcfe-slide {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--tcfe-transition-duration) ease, visibility var(--tcfe-transition-duration) ease;
  z-index: 1;
  pointer-events: none;
}

.tcfe-carousel-container.tcfe-anim-fade .tcfe-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

/* ===================================================
   NAVIGATION ARROWS (Theme-Isolated & High Specificity)
   =================================================== */
.tcfe-carousel-container button.tcfe-nav-arrow,
.tcfe-carousel-container .tcfe-nav-arrow {
  all: unset;
  box-sizing: border-box !important;
  position: absolute !important;
  z-index: 25 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  background-color: #ffffff;
  color: #0f172a;
  cursor: pointer !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.25s ease !important;
  line-height: 1 !important;
  font-size: 18px !important;
  text-align: center !important;
  text-indent: 0 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  overflow: hidden !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  top: 50%;
  transform: translateY(-50%);
}

.tcfe-carousel-container button.tcfe-nav-arrow::before,
.tcfe-carousel-container button.tcfe-nav-arrow::after,
.tcfe-carousel-container .tcfe-nav-arrow::before,
.tcfe-carousel-container .tcfe-nav-arrow::after {
  display: none !important;
  content: none !important;
}

.tcfe-carousel-container button.tcfe-nav-arrow svg,
.tcfe-carousel-container .tcfe-nav-arrow svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  pointer-events: none !important;
}

.tcfe-carousel-container button.tcfe-nav-arrow i,
.tcfe-carousel-container .tcfe-nav-arrow i {
  font-size: 18px !important;
  line-height: 1 !important;
}

.tcfe-carousel-container button.tcfe-nav-arrow:hover,
.tcfe-carousel-container .tcfe-nav-arrow:hover {
  background-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
  transform: translateY(-50%) scale(1.06) !important;
}

.tcfe-carousel-container button.tcfe-nav-arrow:focus-visible,
.tcfe-carousel-container .tcfe-nav-arrow:focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 3px !important;
}

.tcfe-carousel-container button.tcfe-nav-arrow:disabled,
.tcfe-carousel-container .tcfe-nav-arrow:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  transform: translateY(-50%) !important;
}

/* Arrow Horizontal Placement */
.tcfe-carousel-container button.tcfe-nav-arrow-prev,
.tcfe-carousel-container .tcfe-nav-arrow-prev {
  left: 16px !important;
  right: auto !important;
}

.tcfe-carousel-container button.tcfe-nav-arrow-next,
.tcfe-carousel-container .tcfe-nav-arrow-next {
  right: 16px !important;
  left: auto !important;
}

/* Arrow Vertical Alignment Variations */
.tcfe-carousel-container.tcfe-arrows-pos-center button.tcfe-nav-arrow,
.tcfe-carousel-container.tcfe-arrows-pos-center .tcfe-nav-arrow {
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}
.tcfe-carousel-container.tcfe-arrows-pos-center button.tcfe-nav-arrow:hover,
.tcfe-carousel-container.tcfe-arrows-pos-center .tcfe-nav-arrow:hover {
  transform: translateY(-50%) scale(1.06) !important;
}

.tcfe-carousel-container.tcfe-arrows-pos-top button.tcfe-nav-arrow,
.tcfe-carousel-container.tcfe-arrows-pos-top .tcfe-nav-arrow {
  top: 16px !important;
  bottom: auto !important;
  transform: none !important;
}
.tcfe-carousel-container.tcfe-arrows-pos-top button.tcfe-nav-arrow:hover,
.tcfe-carousel-container.tcfe-arrows-pos-top .tcfe-nav-arrow:hover {
  transform: scale(1.06) !important;
}

.tcfe-carousel-container.tcfe-arrows-pos-bottom button.tcfe-nav-arrow,
.tcfe-carousel-container.tcfe-arrows-pos-bottom .tcfe-nav-arrow {
  top: auto !important;
  bottom: 16px !important;
  transform: none !important;
}
.tcfe-carousel-container.tcfe-arrows-pos-bottom button.tcfe-nav-arrow:hover,
.tcfe-carousel-container.tcfe-arrows-pos-bottom .tcfe-nav-arrow:hover {
  transform: scale(1.06) !important;
}

/* ===================================================
   NAVIGATION DOTS (Theme-Isolated & High Specificity)
   =================================================== */
.tcfe-carousel-container .tcfe-dots-container {
  position: absolute !important;
  z-index: 25 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  bottom: 16px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  list-style: none !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
}

/* Dot Positions */
.tcfe-carousel-container.tcfe-dots-pos-bottom_center .tcfe-dots-container {
  bottom: 16px !important;
  top: auto !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}

.tcfe-carousel-container.tcfe-dots-pos-top_center .tcfe-dots-container {
  top: 16px !important;
  bottom: auto !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}

.tcfe-carousel-container.tcfe-dots-pos-bottom_left .tcfe-dots-container {
  bottom: 16px !important;
  top: auto !important;
  left: 20px !important;
  right: auto !important;
  transform: none !important;
}

.tcfe-carousel-container.tcfe-dots-pos-bottom_right .tcfe-dots-container {
  bottom: 16px !important;
  top: auto !important;
  right: 20px !important;
  left: auto !important;
  transform: none !important;
}

.tcfe-carousel-container button.tcfe-dot,
.tcfe-carousel-container .tcfe-dot {
  all: unset;
  display: inline-block !important;
  position: relative !important;
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-width: 40px !important;
  max-height: 10px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: rgba(15, 23, 42, 0.28) !important;
  background-color: rgba(15, 23, 42, 0.28) !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  flex-shrink: 0 !important;
}

.tcfe-carousel-container button.tcfe-dot:hover,
.tcfe-carousel-container .tcfe-dot:hover {
  background: rgba(15, 23, 42, 0.6) !important;
  background-color: rgba(15, 23, 42, 0.6) !important;
}

.tcfe-carousel-container button.tcfe-dot.is-active,
.tcfe-carousel-container .tcfe-dot.is-active {
  width: 24px !important;
  min-width: 24px !important;
  background: #0f172a !important;
  background-color: #0f172a !important;
  border-radius: 9999px !important;
}

.tcfe-carousel-container button.tcfe-dot:focus-visible,
.tcfe-carousel-container .tcfe-dot:focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
}

.tcfe-carousel-container button.tcfe-dot::before,
.tcfe-carousel-container button.tcfe-dot::after,
.tcfe-carousel-container .tcfe-dot::before,
.tcfe-carousel-container .tcfe-dot::after {
  display: none !important;
  content: none !important;
}

.tcfe-carousel-container .tcfe-dot .screen-reader-text {
  display: none !important;
}

/* Screen reader text utility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* PLACEHOLDER CARD FOR EMPTY SLIDES */
.tcfe-slide-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 32px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
}

.tcfe-placeholder-card {
  max-width: 480px;
  margin: 0 auto;
}

.tcfe-placeholder-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  margin-bottom: 12px;
}

.tcfe-placeholder-card h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.tcfe-placeholder-card p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.tcfe-editor-notice {
  padding: 24px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  font-size: 14px;
  text-align: center;
}

/* ===================================================
   RESPONSIVE VISIBILITY OVERRIDES (Mobile & Tablet)
   =================================================== */
@media (max-width: 767px) {
  .tcfe-carousel-container.tcfe-hide-arrows-mobile button.tcfe-nav-arrow,
  .tcfe-carousel-container.tcfe-hide-arrows-mobile .tcfe-nav-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .tcfe-carousel-container.tcfe-hide-dots-mobile .tcfe-dots-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .tcfe-carousel-container.tcfe-hide-arrows-tablet button.tcfe-nav-arrow,
  .tcfe-carousel-container.tcfe-hide-arrows-tablet .tcfe-nav-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .tcfe-carousel-container.tcfe-hide-dots-tablet .tcfe-dots-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}