/* =====================
   Promotion Component CSS - MobRadio
   ===================== */

/* Container styles */
.promotion-carousel,
.promotion-grid {
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 70px; /* Reduced padding to keep arrows on screen */
}

/* Ensure carousel container is properly set up */
.promotion-carousel {
  position: relative;
  overflow: visible; /* Changed from hidden to visible for arrows */
  width: 100%;
}

/* Fix for potential theme conflicts */
.promotion-carousel * {
  box-sizing: border-box;
}

/* Grid layout */
.promotion-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 15px; /* Reset padding for grid */
}

.promotion-grid .promotion-item {
  flex: 0 0 calc(33.333% - 20px);
  min-width: 250px !important;
}

@media (max-width: 768px) {
  .promotion-grid .promotion-item {
    flex: 0 0 calc(50% - 20px);
    /* max-width: calc(50% - 20px); */
  }
}

@media (max-width: 480px) {
  .promotion-grid .promotion-item {
    flex: 0 0 100%;
    /* max-width: 100%; */
  }
}

/* Slick carousel base styles */
.promotion-carousel .slick-slider {
  position: relative;
  display: block;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -khtml-user-select: none;
  -ms-touch-action: pan-y;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.promotion-carousel .slick-list {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.promotion-carousel .slick-list:focus {
  outline: none;
}

.promotion-carousel .slick-list.dragging {
  cursor: pointer;
  cursor: hand;
}

.promotion-carousel .slick-slider .slick-track,
.promotion-carousel .slick-slider .slick-list {
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.promotion-carousel .slick-track {
  position: relative;
  top: 0;
  left: 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.promotion-carousel .slick-track:before,
.promotion-carousel .slick-track:after {
  display: table;
  content: "";
}

.promotion-carousel .slick-track:after {
  clear: both;
}

.promotion-carousel .slick-loading .slick-track {
  visibility: hidden;
}

.promotion-carousel .slick-slide {
  display: none;
  float: left;
  height: 100%;
  min-height: 1px;
  padding: 0 10px; /* Add padding between slides */
}

[dir="rtl"] .promotion-carousel .slick-slide {
  float: right;
}

.promotion-carousel .slick-slide img {
  display: block;
}

.promotion-carousel .slick-slide.slick-loading img {
  display: none;
}

.promotion-carousel .slick-slide.dragging img {
  pointer-events: none;
}

.promotion-carousel .slick-initialized .slick-slide {
  display: block;
}

.promotion-carousel .slick-loading .slick-slide {
  visibility: hidden;
}

.promotion-carousel .slick-vertical .slick-slide {
  display: block;
  height: auto;
  border: 1px solid transparent;
}

/* Force proper slide display */
.promotion-carousel.slick-initialized .slick-slide {
  display: block !important;
}

/* Ensure slides are properly sized */
.promotion-carousel .slick-slide > div {
  width: 100%;
}

/* Carousel navigation - Fixed positioning and styling */
.promotion-carousel .slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px !important;
  height: 50px !important;
  background: rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-radius: 50% !important;
  color: white !important;
  font-size: 0 !important; /* Hide default text */
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.promotion-carousel .slick-arrow:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: translateY(-50%) scale(1.1);
}

.promotion-carousel .slick-arrow:before {
  font-family: Arial, sans-serif !important;
  font-size: 20px !important;
  line-height: 1 !important;
  opacity: 1 !important;
  color: white !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: bold !important;
}

.promotion-carousel .slick-prev {
  left: -65px !important; /* Adjusted to be visible */
}

.promotion-carousel .slick-prev:before {
  content: "‹" !important; /* Single angle bracket */
}

.promotion-carousel .slick-next {
  right: -65px !important; /* Adjusted to be visible */
}

.promotion-carousel .slick-next:before {
  content: "›" !important; /* Single angle bracket */
}

/* Mobile adjustments for arrows */
@media (max-width: 1024px) {
  .promotion-carousel,
  .promotion-grid {
    padding: 0 70px; /* Reduced padding for medium screens */
  }

  .promotion-carousel .slick-prev {
    left: -60px !important;
  }

  .promotion-carousel .slick-next {
    right: -60px !important;
  }
}

@media (max-width: 768px) {
  .promotion-carousel,
  .promotion-grid {
    padding: 0 60px; /* Reduced padding for tablets */
  }

  .promotion-carousel .slick-prev {
    left: -50px !important;
    width: 45px !important;
    height: 45px !important;
  }

  .promotion-carousel .slick-next {
    right: -50px !important;
    width: 45px !important;
    height: 45px !important;
  }
}

@media (max-width: 480px) {
  .promotion-carousel,
  .promotion-grid {
    padding: 0 50px; /* Reduced padding for mobile */
  }

  .promotion-carousel .slick-prev {
    left: 0px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .promotion-carousel .slick-next {
    right: 0px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .promotion-carousel .slick-arrow:before {
    font-size: 18px !important; /* Slightly smaller arrows on mobile */
  }
}

@media (max-width: 360px) {
  .promotion-carousel,
  .promotion-grid {
    padding: 0 45px; /* Even less padding for very small screens */
  }

  .promotion-carousel .slick-prev {
    left: -35px !important;
    width: 35px !important;
    height: 35px !important;
  }

  .promotion-carousel .slick-next {
    right: -35px !important;
    width: 35px !important;
    height: 35px !important;
  }

  .promotion-carousel .slick-arrow:before {
    font-size: 16px !important; /* Even smaller arrows for tiny screens */
  }
}

/* Carousel dots */
.promotion-carousel .slick-dots {
  position: absolute;
  bottom: -40px !important; /* Moved down more */
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  text-align: center;
}

.promotion-carousel .slick-dots li {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0 5px;
  padding: 0;
  cursor: pointer;
}

.promotion-carousel .slick-dots li button {
  font-size: 0;
  line-height: 0;
  display: block;
  width: 20px;
  height: 20px;
  padding: 5px;
  cursor: pointer;
  color: transparent;
  border: 0;
  outline: none;
  background: transparent;
}

.promotion-carousel .slick-dots li button:hover,
.promotion-carousel .slick-dots li button:focus {
  outline: none;
}

.promotion-carousel .slick-dots li button:hover:before,
.promotion-carousel .slick-dots li button:focus:before {
  opacity: 1;
}

.promotion-carousel .slick-dots li button:before {
  font-family: "slick";
  font-size: 12px !important;
  line-height: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  content: "•";
  text-align: center;
  opacity: 0.25;
  color: black;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.promotion-carousel .slick-dots li.slick-active button:before {
  opacity: 0.75;
  color: black;
}

/* Single promotion styles */
.promotion-single {
  /* max-width: 400px; */
  margin: 20px auto;
}

/* Item styles - Increased size with consistent dimensions */
.promotion-item {
  padding: 20px; /* Increased from 15px */
  text-align: center;
  background: #fff;
  border-radius: 12px; /* Increased border radius */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow */
  margin: 10px;
  outline: none; /* Remove focus outline for carousel items */
  min-height: 420px; /* Increased minimum height */
  max-height: 420px; /* Fixed maximum height for consistency */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Ensure promotion items have consistent height in carousel */
.promotion-carousel .promotion-item {
  height: 420px !important; /* Fixed height for all carousel items */
  min-height: 420px; /* Increased from 300px */
  max-height: 420px; /* Fixed maximum height */
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
}

/* Square image container - ENFORCED for all images */
.promotion-image {
  width: 100% !important;
  height: 200px !important; /* Fixed height for consistency */
  aspect-ratio: 1 !important; /* Makes it square */
  overflow: hidden !important;
  border-radius: 8px !important;
  margin-bottom: 15px !important;
  background-color: #f5f5f5 !important; /* Fallback background */
  flex-shrink: 0 !important; /* Prevent shrinking */
}

.promotion-image img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 8px !important;
  object-fit: cover !important; /* Ensures image covers the square area */
  object-position: center !important; /* Centers the image */
}

.promotion-title {
  margin: 15px 0; /* Increased margin */
  font-size: 18px !important; /* Consistent font size */
  font-weight: 600; /* Added font weight */
  color: #333;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  text-align: center;
  overflow: hidden; /* Prevent text overflow */
}

.promotion-details-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 20px; /* Increased padding */
  border-radius: 6px; /* Increased border radius */
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
  font-size: 16px; /* Increased font size */
  font-weight: 500;
  flex-shrink: 0; /* Prevent button shrinking */
}

.promotion-details-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.promotion-details-btn:active {
  background-color: #0056b3;
  color: #fff;
  transform: translateY(0);
}

/* Modal styles */
.promotion-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.promotion-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1000000;
}

.promotion-modal-content h2 {
  margin-top: 30px !important;
}

/* Modal image should also be square */
.promotion-modal-content .promotion-image {
  width: 100% !important;
  max-width: 300px !important; /* Limit modal image size */
  height: 300px !important; /* Square dimensions */
  aspect-ratio: 1 !important;
  margin: 0 auto 20px auto !important; /* Center the image */
  overflow: hidden !important;
  border-radius: 8px !important;
  background-color: #f5f5f5 !important;
}

.promotion-modal-content .promotion-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 8px !important;
}

.promotion-modal-close {
  position: absolute;
  border-radius: 5px;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 0px 10px 0px 10px !important;
  margin-right: -10px !important;
}

.promotion-modal-close:hover,
.promotion-modal-close:focus {
  color: white !important;
  background: #888 !important;
  padding: 0px 10px 0px 10px !important;
}

.promotion-details {
  margin-top: 20px;
}

.promotion-gifts {
  margin-top: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.promotion-subscribe-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.promotion-subscribe-btn:hover {
  background-color: #218838;
}

.promotion-subscribe-btn:active {
  background-color: #218838;
  color: #fff;
}

.back-btn:active {
  background-color: #218838;
  color: #fff;
}

/* Termos da promoção */
.promotion-terms-link-wrapper {
  text-align: center;
  margin-top: 16px;
}

.promotion-terms-link {
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1em;
  transition: color 0.2s;
}

.promotion-terms-link:hover,
.promotion-terms-link:focus {
  color: #0056b3;
}

/* Espaçamento da pergunta */
.promotion-question-spacing {
  padding: 10px 0;
}

/* Campo de resposta */
.promotion-answer-textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  margin-bottom: 10px;
  resize: vertical;
  box-sizing: border-box;
}

/* Mensagem de inscrição */
.promotion-enroll-message {
  margin-top: 14px;
  font-size: 1em;
  text-align: center;
}

/* Modal de termos */
.promotion-terms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promotion-terms-modal {
  background: #fff;
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 16px #0002;
  min-width: 320px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
}

.promotion-terms-modal-header {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  position: relative;
  min-height: 32px;
}

.promotion-terms-modal-close-top {
  width: auto !important;
  background: none;
  border: none;
  color: #888;
  font-size: 1.7em;
  cursor: pointer;
  z-index: 2;
  padding: 1px 5px 3px 5px !important;
  line-height: 1;
  transition: color 0.2s;
  margin-top: 4px;
  margin-right: 2px;
}

.promotion-terms-modal-close-top:hover,
.promotion-terms-modal-close-top:focus {
  color: white !important;
  background: #888 !important;
}

.promotion-terms-modal-title {
  font-size: 1.15em;
  font-weight: bold;
  margin-bottom: 12px;
  color: #222;
  margin-top: 8px;
}

.promotion-terms-modal-content {
  font-size: 1em;
  color: #333;
  margin-bottom: 18px;
}

.promotion-terms-modal-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.promotion-terms-modal-close {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 7px 22px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}

.promotion-terms-modal-close:hover,
.promotion-terms-modal-close:focus {
  background: #0056b3;
}

.promotion-subscribe-btn-disabled {
  background-color: #bfc9c9 !important;
  color: #eee !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.promotion-enroll-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.1em;
  color: #007bff;
  margin-top: 10px;
}

.promotion-loading-spinner {
  width: 24px;
  height: 24px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== Promotion List and Items ===== */

/* ===== Buttons and Actions ===== */

/* ===== Error and Success Messages ===== */
