/**
 * Advertisement Display Styles
 * 
 * Styles for rendering sponsor/advertiser content on the site.
 * Works with ad-display.js module.
 */

/* Ad Slot Container */
.ad-slot {
  margin: 24px 0;
}

.ad-slot--empty {
  display: none;
}

.ad-slot--active {
  display: block;
}

/* Ad Card */
.ad-card {
  background: linear-gradient(135deg, #1a2f35 0%, #243b44 100%);
  border: 1px solid rgba(255, 140, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 140, 0, 0.4);
}

/* Sponsor Label */
.ad-sponsor-label {
  background: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ad-sponsor-label i {
  font-size: 10px;
}

/* Ad Media */
.ad-media {
  position: relative;
  width: 100%;
  background: #0d1a1f;
}

.ad-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 200px;
}

.ad-media video,
.ad-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

/* YouTube Play Overlay */
.ad-video {
  cursor: pointer;
}

.ad-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, color 0.2s ease;
  pointer-events: none;
}

.ad-video:hover .ad-play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  color: #ff8c00;
}

/* Ad Content */
.ad-content {
  padding: 16px;
}

.ad-advertiser {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ad-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.ad-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-bottom: 12px;
}

.ad-description p {
  margin: 0 0 8px 0;
}

.ad-description p:last-child {
  margin-bottom: 0;
}

/* Discount Code */
.ad-discount {
  background: rgba(255, 140, 0, 0.1);
  border: 1px dashed rgba(255, 140, 0, 0.4);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
}

.ad-discount-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-bottom: 4px;
}

.ad-discount-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #ff8c00;
  letter-spacing: 2px;
  display: block;
  user-select: all;
  cursor: pointer;
}

.ad-discount-details {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-top: 4px;
}

/* CTA Button */
.ad-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  justify-content: center;
}

.ad-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.ad-cta i {
  font-size: 12px;
}

/* Sidebar-specific styles - compact vertical layout */
.blog-sidebar .ad-slot {
  margin-top: 0;
  max-width: 220px;
}

.blog-sidebar .ad-card {
  border-radius: 10px;
}

.blog-sidebar .ad-sponsor-label {
  padding: 4px 10px;
  font-size: 10px;
}

.blog-sidebar .ad-media img {
  max-height: 120px;
  object-fit: contain;
  background: #0d1a1f;
}

.blog-sidebar .ad-content {
  padding: 12px;
}

.blog-sidebar .ad-advertiser {
  font-size: 10px;
  margin-bottom: 2px;
}

.blog-sidebar .ad-title {
  font-size: 14px;
  margin-bottom: 6px;
}

.blog-sidebar .ad-description {
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-sidebar .ad-discount {
  padding: 8px;
  margin-bottom: 8px;
}

.blog-sidebar .ad-discount-code {
  font-size: 14px;
  letter-spacing: 1px;
}

.blog-sidebar .ad-discount-label,
.blog-sidebar .ad-discount-details {
  font-size: 10px;
}

.blog-sidebar .ad-cta {
  padding: 8px 12px;
  font-size: 12px;
}

/* Banner placement (full width) */
.ad-slot[data-placement="banner"] .ad-card {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.ad-slot[data-placement="banner"] .ad-media {
  width: 300px;
  flex-shrink: 0;
}

.ad-slot[data-placement="banner"] .ad-media img {
  max-height: 150px;
}

.ad-slot[data-placement="banner"] .ad-content {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .ad-slot[data-placement="banner"] .ad-card {
    flex-direction: column;
  }

  .ad-slot[data-placement="banner"] .ad-media {
    width: 100%;
  }

  .ad-title {
    font-size: 16px;
  }

  .ad-discount-code {
    font-size: 18px;
  }
}
