/* ===================================
   Discount Block Styles
   Shared styles for single-discount and discounts-list
   =================================== */

/* Container for single discount */
.zavcode-single-discount {
  width: 100%;
}

/* Reset default spacing inside discount components */
.discount-item h1,
.discount-item h2,
.discount-item h3,
.discount-item h4,
.discount-item h5,
.discount-item h6,
.discount-item p,
.discount-item ul,
.discount-item ol,
.discount-item img,
.discount-item li {
  margin: 0 !important;
  padding: 0 !important;
}

/* Container for discounts list */
.zavcode-discounts-list {
  width: 100%;
}

/* Individual discount item - shared styles */
.discount-item {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Spacing between items in list */
.zavcode-discounts-list .discount-item {
  margin-bottom: 1.5rem;
}

.zavcode-discounts-list .discount-item:last-child {
  margin-bottom: 0;
}

/* Hero Section with Banner */
.discount-item .discount-hero-section {
  position: relative;
  height: 180px;
  width: 100%;
  background: #fcfcfc;
}

.discount-item .discount-banner {
  width: 100%;
  height: 100%;
}

.discount-item .discount-banner img {
  width: 100%;
  height: 180px;
  max-width: 100%;
  object-fit: cover;
}

.wp-block .discount-item img {
  margin: 0 !important;
  padding: 0 !important;
}

.discount-item .discount-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discount-item .discount-logo-box {
  padding: 2rem 3rem;
}

.discount-item .discount-logo-box img {
  width: 200px;
  height: 80px;
  object-fit: contain;
}

/* Content Wrapper - flex container for spacing */
.discount-item .discount-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #ffffff;
  padding: 1.5rem;
  gap: 1.5rem;
}

/* Content Section */
.discount-item .fusion-promo-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.discount-item .fusion-promo-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* Promo details wrapper (description + title + text) */
.discount-item .fusion-promo-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

/* Promo action wrapper (how to use + action row) */
.discount-item .fusion-promo-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* How to use wrapper */
.discount-item .fusion-how-to-use {
  display: flex;
  flex-direction: column;
}

.discount-item .fusion-brand-title {
  color: #000;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin: 0 !important;
}

.discount-item img,
.strategic-partners-section img {
  margin-bottom: 0 !important;
}

.discount-item .fusion-main-heading {
  font-family: 'Roboto', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.18;
  color: #000000;
  margin: 0;
}

.discount-item .fusion-description {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333333;
  margin: 0;
}

.fusion-description p {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333333;
  margin: 0;
}

.discount-item .fusion-promo-title {
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #000000;
  margin: 0;
}

.discount-item .fusion-promo-text {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #444444;
  margin: 0;
}

/* Action Row with Promo Code */
.discount-item .fusion-action-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
}

/* Promo Code Box */
.discount-item .promo-code-box {
  flex-grow: 1;
  border: 1px dashed #a00e0e;
  border-radius: 4px;
  padding: 16px;
  gap: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fcfcfc;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  height: 54px;
  box-sizing: border-box;
}

.discount-item .promo-code-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(252, 252, 252, 0.9);
  backdrop-filter: blur(4px);
}

.discount-item .promo-code-text {
  font-family: 'Roboto Condensed', sans-serif;
  color: #a00e0e;
  font-size: 16px;
  font-weight: 700;
  line-height: 140%;
  position: relative;
  z-index: 10;
  flex: none;
  order: 0;
  flex-grow: 0;
}

/* When no code is required */
.discount-item .promo-code-box:has(.promo-code-text:only-child) {
  justify-content: center;
  border: 1px dashed #dbdbdb;
}

.discount-item .promo-code-box .promo-code-text:only-child {
  color: #a4a4a4;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
}

.discount-item .promo-copy-button {
  font-family: 'Roboto Condensed', sans-serif;
  color: #a00e0e;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  position: relative;
  z-index: 10;
  outline: none;
  flex: none;
  order: 1;
  flex-grow: 0;
}

.discount-item .promo-copy-button:hover {
  opacity: 0.8;
}

.discount-item .promo-copy-button:focus {
  outline: none;
}

.discount-item .promo-copy-button:focus-visible {
  outline: 2px solid #a00e0e;
  outline-offset: 2px;
}

.discount-item .fusion-cta-button {
  font-family: 'Roboto Condensed', sans-serif;
  background-color: #e63946;
  color: #ffffff;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 140%;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  box-sizing: border-box;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.discount-item .fusion-cta-button:hover {
  background-color: #a00e0e;
}

/* Related Articles Section */
.discount-item .related-articles-section {
  background-color: #f9f9f9;
  padding: 16px;
  gap: 8px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.discount-item .related-articles-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: #000000;
}

.discount-item .related-articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discount-item .related-articles-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discount-item .related-articles-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  background: #000000;
  border-radius: 50%;
  flex-shrink: 0;
}

.discount-item .related-article-link {
  font-family: 'Roboto Condensed', sans-serif;
  color: #a00e0e;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s;
}

.discount-item .related-article-link:hover {
  color: #e63946;
}

/* No discount/error messages */
.zavcode-single-discount .no-discount {
  font-family: 'Roboto Condensed', sans-serif;
  text-align: center;
  color: #999;
  font-size: 1rem;
  padding: 2rem;
}

.zavcode-discounts-list .no-discounts {
  font-family: 'Roboto Condensed', sans-serif;
  text-align: center;
  color: #666;
  font-size: 1rem;
  padding: 2rem;
}

/* Responsive */
@media (min-width: 768px) {
  .discount-item .fusion-action-row {
    flex-direction: row;
  }
}
