/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* .learndash-flashcards-card-container{
     width: 100%;
     margin: 0 0 1.0em 0;
     -webkit-perspective: 800px;
     -moz-perspective: 800px;
     -o-perspective: 800px;
     perspective: 800px;     
 }
 .learndash-flashcards-card{
     width: 100%;
    position: absolute;
    -webkit-transition: -webkit-transform 1s;
    -moz-transition: -moz-transform 1s;
    -o-transition: -o-transform 1s;
    transition: transform 1s;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transform-origin: 50% 50%;    
 }
 .learndash-flashcards-card.flipped {
    -webkit-transform: rotateY( 180deg );
    -moz-transform: rotateY( 180deg );
    -o-transform: rotateY( 180deg );
    transform: rotateY( 180deg );
}
 .learndash-flashcards-card-front{
     width: 100%;
     padding: 2.0em;
     position: absolute;
     -webkit-backface-visibility: hidden;
     -moz-backface-visibility: hidden;
     -o-backface-visibility: hidden;
     backface-visibility: hidden;     
 }
 .learndash-flashcards-card-front h2{
    margin: 0 0 0.5em 0 !important;
 }
 .learndash-flashcards-card-front p{
    margin: 0 !important;
 }
 .learndash-flashcards-card-back{
    width: 100%;
    padding: 2.0em;
    position: absolute;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -o-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: rotateY( 180deg );
    -moz-transform: rotateY( 180deg );
    -o-transform: rotateY( 180deg );
    transform: rotateY( 180deg );        
}
.learndash-flashcards-card-back h2{
    margin: 0 0 0.5em 0 !important;
 }
.learndash-flashcards-card-back p{
    margin: 0 !important;
}

.learndash-flashcards-set-container{
    width: 100%;
    padding: 0 0 4.0em 0;
    overflow: hidden;
    position: relative;
}

.learndash-flashcards-set-container .learndash-flashcards-card-container{
   margin: 0 !important;
}

.learndash-flashcards-set-container .owl-item{
   float:left;
}
.learndash-flashcards-set-container .owl-buttons{
   position: absolute;
   width: 100%;
   text-align: center;
   bottom: 1.0em;
   left: 0;
}
.learndash-flashcards-set-container .owl-buttons div{
   width: 36px;
   height: 28px;
   background: #ffffff;
   margin: 0 0.5em;
   position: relative;
   display: inline-block;
}
.learndash-flashcards-set-container .owl-buttons .owl-prev:after{
   content: url('https://api.iconify.design/mdi:arrow-left-bold-outline.svg?height=24');
   position: absolute;
   top:2px;
   left: 4px;
   color: #ffffff;
   
}
.learndash-flashcards-set-container .owl-buttons .owl-next:after{
   content: url('https://api.iconify.design/mdi:arrow-right-bold-outline.svg?height=24');
   position: absolute;
   top:2px;
   left: 6px; 
} */
@keyframes wiggle {
  0%, 100% {
    transform: scale(1.03) rotateZ(0deg);
  }
  25% {
    transform: scale(1.03) rotateZ(2deg);
  }
  50% {
    transform: scale(1.03) rotateZ(-2deg);
  }
  75% {
    transform: scale(1.03) rotateZ(1deg);
  }
}

.learndash-flashcards-set-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

/* Card Stack Container */
.learndash-flashcards-set-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 1.5rem auto 0.5rem;
  min-height: 360px; /* ensures container has height for absolutely positioned cards */
  aspect-ratio: 16/9;
}

.learndash-flashcards-card-container {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9; /* keep the ratio consistent */
}

/* Base wrapper that handles hover wiggle */
.flashcard-hover-wrapper {
  transition: transform 0.3s, box-shadow 0.3s;
  perspective: 1000px;
  cursor: pointer;
}

/* Default Card Container (all cards stacked) */
.learndash-flashcards-card-container {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 0;
}

.learndash-flashcards-card-container.card-single {
  opacity: 1;
  transform: scale(1) translateY(0);
  position: relative;
  cursor: pointer;
  max-width: 640px;
  margin: 1.5rem auto;
}

/* Active Card (visible) */
.learndash-flashcards-card-container.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  z-index: 2;
}

/* Next Card (peeked underneath) */
.learndash-flashcards-card-container.next {
  opacity: 0.6;
  transform: scale(0.96) translateY(12px);
  z-index: 1;
}

/* Flipped card styling */
.learndash-flashcards-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  transition: transform 0.6s;
  background: white;
}

/* Flip trigger */
.learndash-flashcards-card.flipped {
  transform: rotateY(180deg);
}

/* Card faces */
.learndash-flashcards-card-front,
.learndash-flashcards-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  padding: 2rem;
  border-radius: 12px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  box-sizing: border-box;
}

.learndash-flashcards-card-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.learndash-flashcards-card-back {
  transform: rotateY(180deg);
}

/* NAVIGATION */

.flashcard-navigation {
  position: relative;
  margin-top: 1rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 100;
}

.flashcard-navigation button {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #333;
  padding: 0;
  line-height: 1;
}

.flashcard-navigation button:hover {
  color: #1e73be;
  transform: scale(1.2);
}

.flashcard-dots {
  display: flex;
  gap: 0.5rem;
  z-index: 100;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 80%;
}

.flashcard-dots .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0e0e0;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flashcard-dots .dot:hover {
  background: #d0d0d0;
  transform: scale(1.1);
}

.flashcard-dots .dot.active {
  background: #1e73be;
  color: #fff;
  border-color: #1e73be;
}

.flashcard-bookmark-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.4rem;
    color: #ccc;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
}

.flashcard-bookmark-btn:hover {
    color: #eee;
    transform: scale(1.2);
}

.flashcard-bookmark-btn.bookmarked {
    color: #ffcc00;
}

@media (max-width: 480px) {
  .learndash-flashcards-card-front,
  .learndash-flashcards-card-back {
    padding: 1rem;
  }
}

/* Card Area - contains side arrows and card */
.flashcard-card-area {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}

/* Side Chevron Arrows */
.flashcard-side-prev,
.flashcard-side-next {
  background: #fff !important;
  border: 2px solid #1e73be !important;
  border-radius: 50% !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  font-size: 28px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  color: #1e73be !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  position: static !important;
}

.flashcard-side-prev:hover,
.flashcard-side-next:hover {
  background: #1e73be !important;
  color: #fff !important;
  transform: scale(1.1);
}

/* Override container margin when inside flex area */
.flashcard-card-area .learndash-flashcards-set-container {
  flex: 1 !important;
  max-width: 640px !important;
  margin: 0 !important;
}

/* Responsive adjustments for side arrows */
@media (max-width: 700px) {
  .flashcard-side-prev,
  .flashcard-side-next {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    font-size: 22px !important;
  }
  
  .flashcard-card-area {
    gap: 10px !important;
  }
}

@media (max-width: 500px) {
  .flashcard-side-prev,
  .flashcard-side-next {
    display: none !important;
  }
}