/* ACI Training Dates Carousel Styles */
.aci-training-dates {
  margin: 2rem 0;
}

.aci-training-dates-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: end;
}

.aci-training-dates-filters select,
.aci-training-dates-filters input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 150px;
}

.aci-training-dates-filters .aci-btn {
  padding: 0.5rem 1rem;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.aci-training-dates-filters .aci-btn:hover {
  background: #005a87;
}

.aci-training-dates-results {
  min-height: 200px;
}

/* Carousel Styles */
.aci-training-dates-carousel {
  position: relative;
  overflow: hidden;
}

.aci-carousel-header {
  display: flex;
  justify-content: end;
  align-items: center;
  margin-bottom: 1.5rem;
}

.aci-carousel-title {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
	display: none;
}

.aci-carousel-nav {
  display: flex;
  gap: 0.5rem;
}

.aci-carousel-nav .sep  {
  margin-left: 10px;
  margin-right: 10px;
  margin-top: auto;
  margin-bottom: auto;
  font-size: 30px;
  color: #fff;
}

.aci-carousel-prev,
.aci-carousel-next {
  background: transparent;
  border-radius: 50px;
  width: 45px;
  height: 45px;
  color: #fff;
  font-size: 20px;
  border: 1px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.aci-carousel-prev:hover, .aci-carousel-next:hover {
  background: #F7CE26;
  color: #333;
  border-color: #F7CE26;
  transition: all 0.3s ease;
}

.aci-carousel-prev.hide-btn,
.aci-carousel-next.hide-btn {
  display: none !important;
}

.aci-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.aci-carousel-track::-webkit-scrollbar {
  display: none;
}

/* Cloned cards for infinite loop */
.aci-training-date-card.aci-clone {
  pointer-events: none;
  user-select: none;
}

.aci-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.aci-carousel-dot {
  height: 20px;
  width: 20px;
  border-radius: 50px;
  border: none;
  background: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.aci-carousel-dot.active {
  background: #ed7d22;
}

/* Training Date Card - Dynamic Columns */
.aci-training-date-card {
  flex: 0 0 calc(33.333% - 1rem); /* Default 3 columns */
  min-width: 300px;
  background: transparent;
  background: #17458f;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  scroll-snap-align: start;
  position: relative;
  display: flex !important; /* Ensure flexbox for equal height in Slick */
  flex-direction: column;
}

/* Make Slick slides equal height */
.aci-training-dates-carousel .slick-track {
  display: flex !important;
}

.aci-training-dates-carousel .slick-slide {
  height: auto;
  display: flex !important;
  align-items: stretch;
  flex: 1;
}

/* Column Variations */
.aci-training-dates-carousel[data-columns="1"] .aci-training-date-card {
  flex: 0 0 calc(100% - 1rem);
}

.aci-training-dates-carousel[data-columns="2"] .aci-training-date-card {
  flex: 0 0 calc(50% - 1rem);
}

.aci-training-dates-carousel[data-columns="3"] .aci-training-date-card {
  flex: 0 0 calc(33.333% - 1rem);
}

.aci-training-dates-carousel[data-columns="4"] .aci-training-date-card {
  flex: 0 0 calc(25% - 1rem);
}

/* Clickable Card Link - Flexbox for equal height cards */
.aci-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.aci-card-link:hover {
  text-decoration: none;
  color: inherit;
}

.aci-training-date-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: pointer;
  background: #0c2f69;
  box-shadow: none;
  transition: 0.2s ease-in;
  transform: none;
}

/* Image Container - Fixed 16:9 Aspect Ratio */
.aci-training-date-image {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  aspect-ratio: 16 / 9;
}

.aci-training-date-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
}

.aci-training-date-card:hover .aci-training-date-image img {
  transform: scale(1.05);
}

.aci-training-date-content {
  padding: 20px 16px 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.aci-training-date-content h4 {
  margin: 0 0 10px 0;
  margin-bottom: auto;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1.3 !important;
  text-transform: uppercase !important;
}

.aci-training-date-meta {
  margin-bottom: 1.5rem;
}

.aci-meta-item {
  display: flex;
  justify-content: start;
  margin-bottom: 0.5rem;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0px;
  border-bottom: none;
}

.aci-meta-item-container {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  margin-top: 9px;
}

.aci-meta-item.no-disp {
  display: none !important;
}

.aci-meta-item.aci-training-date {
  margin-top: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

.aci-meta-item:last-child {
  border-bottom: none;
}

.aci-meta-label {
  font-weight: 600;
  color: #666;
  min-width: 80px;
}

.aci-meta-value {
  text-align: right;
  color: #ed7d22;
}

.aci-meta-value .sep {
  margin-left:10px;
  margin-right:10px;
  line-height: 0.9;
}

.aci-location-tag,
.aci-category-tag,
.aci-language-tag,
.aci-currency-tag {
  display: inline-block;
  background: transparent;
  border: none;
  color: #ed7d22;
  font-size: 14px;
  font-weight: 300;
  margin: 0;
  padding: 0;
}

/*
.aci-location-tag,
.aci-category-tag,
.aci-language-tag,
.aci-currency-tag {
  display: inline-block;
  background: transparent;
  border: none;
  padding: 6px 11px;
  color: #ed7d22;
  color: #0f3d87;
  font-size: 12px;
  background: #7fb0ff;
  font-weight: 600;
  margin: 0;
  border-radius: 20px;
}
*/

.aci-currency {
  font-size: 0.9em;
  color: #ed7d22;
}

.aci-training-date-actions {
  text-align: center;
}

.aci-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.aci-btn-register {
  border-radius: 50px !important;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  background: #ffffff3b;
  font-weight: 300;
}

.aci-btn-primary:hover {
  background: #005a87;
  color: white;
}

/* Button inside clickable card - styled as button but doesn't interfere with card click */
.aci-card-link .aci-btn {
  pointer-events: none;
  position: relative;
}

.aci-card-link:hover .aci-btn-register {
  background: #F7CE26;
  color: #333;
}

.aci-btn-secondary {
  background: #6c757d;
  color: white;
}

.aci-btn-secondary:hover {
  background: #545b62;
  color: white;
}

.aci-empty {
  text-align: center;
  padding: 3rem;
  color: #fff;
  font-style: normal;
  background: #ffffff1c;
  border-radius: 8px;
  margin-top: 48px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  /* On tablets, reduce columns */
  .aci-training-dates-carousel[data-columns="4"] .aci-training-date-card {
    flex: 0 0 calc(33.333% - 1rem);
  }
  
  .aci-training-dates-carousel[data-columns="3"] .aci-training-date-card {
    flex: 0 0 calc(50% - 1rem);
  }
  
  /* 1 and 2 column layouts stay the same */
}

@media (max-width: 768px) {
  .aci-training-dates-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .aci-training-dates-filters select,
  .aci-training-dates-filters input {
    min-width: auto;
  }
  
  /* All layouts become single column on mobile */
  .aci-training-date-card {
    flex: 0 0 calc(100% - 1rem) !important;
    min-width: 280px;
  }
  
  .aci-carousel-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .aci-meta-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .aci-meta-label,
  .aci-meta-value {
    text-align: left;
  }
}

/* Loading States */
.aci-training-dates[aria-busy="true"] .aci-training-dates-results {
  opacity: 0.6;
  pointer-events: none;
}

.aci-training-dates[aria-busy="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Avada Theme Compatibility */
.fusion-modal .aci-training-date-card {
  box-shadow: none;
  margin: 0;
}

.fusion-modal .aci-btn {
  border-radius: var(--btn_radius, 4px);
}

/* Admin Styles */
.aci-training-date-fields {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.aci-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aci-field label {
  font-weight: 600;
}

.aci-field input[type="date"],
.aci-field input[type="text"],
.aci-field input[type="url"],
.aci-field select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-width: 400px;
}

.aci-field .description {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.25rem;
}

/* Provider Logo Styles */
.aci-provider-meta {
  display: flex !important;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0px;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0px;
  border-top: none;
  display: none !important;
}

.aci-provider-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.aci-provider-logo {
  width: auto;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0px;
  margin-right: 12px;
}

.aci-provider-logo:hover {
  transform: scale(1.05);
}

/* Fallback text style for providers without logos */
.aci-provider-meta .aci-provider-tag {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ed7d22;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
}

/* Responsive - smaller logos on mobile */
@media (max-width: 768px) {
  .aci-provider-logo {
    width: 60px;
    height: 60px;
    padding: 6px;
  }
  
  .aci-provider-meta {
    padding: 0.75rem 0;
  }
}
