/*
 * ws-offer-slider.css - Final Merged and Dynamic Version
 * Colors are controlled by wp_add_inline_style from plugin settings.
 */

/* Main offer bar */
.ws-offer-bar {
  /* background-color and color properties are set dynamically by PHP */
  position: relative;
  z-index: 1000;
  width: 100%;
  overflow: hidden;
  /* Added base padding from previous version for consistency */
  padding: 8px 0; 
}

/* Slider container */
.ws-offer-slider {
  max-width: 767px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Each slide */
.ws-offer-slider .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px; /* Using your requested 4px gap */
  white-space: nowrap;
  padding: 0 8px;
}

.ws-offer-slider .swiper-wrapper {
  align-items: center !important;
}

/* Offer text */
.ws-offer-slider .offer-text {
  /* FIX: Must use 'inherit' to get the dynamic color from .ws-offer-bar */
  color: inherit;
  font-weight: 500;
  font-size: 13px;
}

/* Copy button */
.ws-offer-slider .copy-btn {
  /* FIX: Must use 'inherit' for text color */
  color: inherit;
  /* FIX: Use currentColor for border, which matches the dynamic text color */
  border: 1px solid currentColor;
  margin: 0;
  cursor: pointer;
  /* FIX: Restoring button visibility/structure */
  line-height: 1.2; 
  padding: 3px 6px; 
  height: auto;
  border-radius: 4px;
  font-size: 13px; /* Base size */
  font-weight: 700;
  background: transparent !important;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.ws-offer-slider .copy-btn:hover {
  /* FIX: Use opacity for subtle hover, avoid hardcoded color */
  opacity: 0.8;
}

/* Coupon code text (the code itself) */
.ws-offer-slider .copy-btn .coupon-text {
    /* Inherit the dynamic color */
    color: inherit; 
}

/* 'COPY' label part and separator */
.ws-offer-slider .copy-btn .copy-label {
    /* Separator line uses dynamic color via currentColor */
    border-left: 1px solid currentColor; 
    padding-left: 8px;
    font-size: 11px;
    font-weight: 500;
    color: inherit;
    text-transform: uppercase;
}

/* Swiper arrows → small + positioned */
.ws-offer-slider .swiper-button-prev,
.ws-offer-slider .swiper-button-next {
  width: 20px;
  height: 20px;
  /* FIX: Must use inherit to get the dynamic color */
  color: inherit !important;
  top: 50% !important; /* Centered vertically */
  transform: translateY(-50%);
}

.ws-offer-slider .swiper-button-prev:after,
.ws-offer-slider .swiper-button-next:after {
  font-size: 12px !important;
}

/* Responsive */
@media (max-width: 768px) {
  .ws-offer-bar {
    font-size: 12px;
    padding: 5px 0;
  }
  .ws-offer-slider .offer-text {
    font-size: 12px;
  }
  .ws-offer-slider .copy-btn {
    font-size: 12px; 
    padding: 3px 6px;
    gap: 5px;
  }
  .ws-offer-slider .copy-btn .copy-label {
      display: none; /* Hide 'COPY' label on mobile */
  }
  .ws-offer-slider .swiper-button-prev,
  .ws-offer-slider .swiper-button-next {
      display: none; /* Hide arrows on mobile */
  }
}

@media (max-width: 480px) {
  .ws-offer-bar {
    font-size: 11px;
    padding: 4px 0;
  }
  .ws-offer-slider .offer-text {
    font-size: 11px;
  }
}