/**
 * ADW Flash Info Banner - Frontend Styles
 * 
 * @author    ADW
 * @copyright 2025 ADW
 * @license   MIT
 */

/* ============================================
   Wrapper & Container
   ============================================ */

.adw-flash-info-carousel{
max-width: 80rem;
margin: 0 auto;
overflow: hidden;
}

.adw-flash-info-wrapper {
  background: linear-gradient(135deg, #E6254F 0%, #c91d3f 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.adw-flash-info-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ============================================
   Flash Info Item
   ============================================ */

.adw-flash-info-item {
  padding: 1rem 0;
  color: #ffffff;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adw-flash-info-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0 1rem;
}

/* ============================================
   Icon
   ============================================ */

.adw-flash-info-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.adw-flash-info-icon i {
  font-size: 24px;
  color: #ffffff;
}

/* ============================================
   Text Content
   ============================================ */

.adw-flash-info-text {
  flex: 1;
  min-width: 0;
}

.adw-flash-info-title {
  margin: 0;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.adw-flash-info-description {
  margin: 0.25rem 0 0 0;
  padding: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   Arrow (for links)
   ============================================ */

.adw-flash-info-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.adw-flash-info-arrow i {
  font-size: 28px;
  color: #ffffff;
}

/* ============================================
   Link Hover Effects
   ============================================ */

.adw-flash-info-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.adw-flash-info-link:hover {
  text-decoration: none;
  transform: scale(1.02);
}

.adw-flash-info-link:hover .adw-flash-info-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.adw-flash-info-link:hover .adw-flash-info-arrow {
  opacity: 1;
  transform: translateX(5px);
}

/* ============================================
   Single Banner (No Carousel)
   ============================================ */

.adw-flash-info-single {
  position: relative;
}

.adw-flash-info-single .adw-flash-info-item {
  justify-content: center;
  text-align: center;
}

/* ============================================
   Splide Carousel Customization
   ============================================ */

.adw-flash-info-carousel {
  position: relative;
  padding: 0;
}

.adw-flash-info-carousel .splide__track {
  overflow: visible;
}

.adw-flash-info-carousel .splide__slide {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Splide Arrows */
.adw-flash-info-carousel .splide__arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.adw-flash-info-carousel .splide__arrow {
  position: static;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  opacity: 0.7;
}

.adw-flash-info-carousel .splide__arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  transform: scale(1.1);
}

.adw-flash-info-carousel .splide__arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.adw-flash-info-carousel .splide__arrow--prev {
  margin-left: 1rem;
}

.adw-flash-info-carousel .splide__arrow--next {
  margin-right: 1rem;
}

.adw-flash-info-carousel .splide__arrow i {
  color: #ffffff;
  font-size: 24px;
}

.adw-flash-info-carousel .splide__arrow svg {
  display: none;
}

/* Splide Pagination */
.adw-flash-info-carousel .splide__pagination {
  bottom: 0.5rem;
  padding: 0;
  margin: 0;
}

.adw-flash-info-carousel .splide__pagination__page {
  background: rgba(255, 255, 255, 0.4);
  width: 8px;
  height: 8px;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.adw-flash-info-carousel .splide__pagination__page.is-active {
  background: #ffffff;
  transform: scale(1.3);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Desktop Large (≥1400px) */
@media (min-width: 1400px) {
  .adw-flash-info-title {
    font-size: 1.2rem;
  }

  .adw-flash-info-description {
    font-size: 1rem;
  }
}

/* Desktop (≥1200px) */
@media (min-width: 1200px) {
  .adw-flash-info-content {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
  .adw-flash-info-item {
    padding: 0.875rem 0;
  }

  .adw-flash-info-title {
    font-size: 1rem;
  }

  .adw-flash-info-description {
    font-size: 0.85rem;
  }

  .adw-flash-info-icon {
    width: 36px;
    height: 36px;
  }

  .adw-flash-info-icon i {
    font-size: 20px;
  }

  .adw-flash-info-arrow i {
    font-size: 24px;
  }

  .adw-flash-info-carousel .splide__arrow {
    width: 36px;
    height: 36px;
  }

  .adw-flash-info-carousel .splide__arrow i {
    font-size: 20px;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .adw-flash-info-wrapper {
    padding: 0;
  }

  .adw-flash-info-item {
    padding: 0.75rem 0;
    min-height: 50px;
  }

  .adw-flash-info-content {
    gap: 0.75rem;
    padding: 0 0.75rem;
  }

  .adw-flash-info-icon {
    width: 32px;
    height: 32px;
  }

  .adw-flash-info-icon i {
    font-size: 18px;
  }

  .adw-flash-info-title {
    font-size: 0.95rem;
  }

  .adw-flash-info-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 1;
  }

  .adw-flash-info-arrow {
    display: none;
  }

  /* Hide arrows on mobile, keep pagination */
  .adw-flash-info-carousel .splide__arrows {
    display: none;
  }

  .adw-flash-info-carousel .splide__pagination {
    bottom: 0.25rem;
  }

  .adw-flash-info-carousel .splide__pagination__page {
    width: 6px;
    height: 6px;
    margin: 0 3px;
  }
}

/* Mobile Small (≤576px) */
@media (max-width: 576px) {
  .adw-flash-info-title {
    font-size: 0.9rem;
  }

  .adw-flash-info-description {
    display: none;
  }

  .adw-flash-info-content {
    gap: 0.5rem;
  }
}

/* ============================================
   Animations
   ============================================ */

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

.adw-flash-info-wrapper {
  animation: fadeIn 0.5s ease-out;
}

/* ============================================
   Accessibility
   ============================================ */

.adw-flash-info-link:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.adw-flash-info-carousel .splide__arrow:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .adw-flash-info-wrapper::before {
    animation: none;
  }

  .adw-flash-info-wrapper,
  .adw-flash-info-link,
  .adw-flash-info-icon,
  .adw-flash-info-arrow,
  .adw-flash-info-carousel .splide__arrow {
    animation: none;
    transition: none;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .adw-flash-info-wrapper {
    background: #E6254F !important;
    box-shadow: none !important;
  }

  .adw-flash-info-carousel .splide__arrows,
  .adw-flash-info-carousel .splide__pagination {
    display: none !important;
  }
}
