/* ad-unit.css — banner and rewarded ad component styles */

.ad-unit-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  background: linear-gradient(135deg, hsl(240,15%,12%) 0%, hsl(260,15%,14%) 100%);
  border: 1px solid hsl(260,20%,25%);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  position: relative;
  margin: var(--space-4, 16px) 0;
}

.ad-unit-banner-label {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.6rem;
  color: hsl(0,0%,45%);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}

.ad-unit-banner-slot {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rewarded ad button */
.ad-unit-rewarded {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: var(--space-3, 12px) var(--space-4, 16px);
  background: linear-gradient(135deg, hsl(35,90%,18%) 0%, hsl(260,20%,14%) 100%);
  border: 1px solid hsl(35,80%,35%);
  border-radius: var(--radius-lg, 12px);
  margin: var(--space-4, 16px) 0;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  width: 100%;
  max-width: 380px;
}

.ad-unit-rewarded:hover {
  border-color: hsl(35,90%,55%);
  transform: translateY(-1px);
}

.ad-unit-rewarded-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.ad-unit-rewarded-text {
  flex: 1;
}

.ad-unit-rewarded-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: hsl(35,90%,72%);
  line-height: 1.2;
}

.ad-unit-rewarded-subtitle {
  font-size: 0.75rem;
  color: hsl(0,0%,60%);
  margin-top: 2px;
}

.ad-unit-rewarded-cc {
  font-size: 0.82rem;
  font-weight: 700;
  color: hsl(140,80%,60%);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Countdown overlay */
.ad-unit-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5, 20px);
}

.ad-unit-overlay-mock {
  width: min(680px, 90vw);
  height: min(380px, 50vh);
  background: linear-gradient(135deg, hsl(260,15%,10%) 0%, hsl(240,18%,14%) 100%);
  border: 1px solid hsl(260,20%,30%);
  border-radius: var(--radius-lg, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ad-unit-overlay-ad-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 0.65rem;
  color: hsl(0,0%,40%);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-unit-overlay-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-unit-countdown-bar-wrap {
  width: min(680px, 90vw);
  height: 6px;
  background: hsl(0,0%,15%);
  border-radius: 9999px;
  overflow: hidden;
}

.ad-unit-countdown-bar {
  height: 100%;
  background: linear-gradient(90deg, hsl(140,80%,50%), hsl(160,80%,60%));
  border-radius: 9999px;
  transition: width 1s linear;
}

.ad-unit-countdown-label {
  font-size: 0.82rem;
  color: hsl(0,0%,55%);
}

.ad-unit-skip-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid hsl(0,0%,30%);
  border-radius: 9999px;
  color: hsl(0,0%,55%);
  font-size: 0.8rem;
  cursor: not-allowed;
  transition: border-color 0.2s, color 0.2s;
}

.ad-unit-skip-btn.ready {
  border-color: hsl(140,70%,50%);
  color: hsl(140,80%,60%);
  cursor: pointer;
}

/* ── Custom ad images ─────────────────────────────────────────────────────── */

.ad-unit-banner--custom {
  padding: 0;
  overflow: hidden;
}

.ad-unit-custom-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.ad-unit-custom-img {
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-lg, 12px);
  transition: opacity 0.2s;
}

.ad-unit-custom-img:hover {
  opacity: 0.88;
}

.ad-unit-overlay-mock--custom {
  overflow: hidden;
  cursor: pointer;
}

/* ── Video ad overlay ─────────────────────────────────────────────────────── */

.ad-unit-overlay-mock--video {
  padding: 0;
  overflow: hidden;
  background: #000;
}

.ad-unit-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ad-unit-unmute-btn {
  position: absolute;
  bottom: 10px;
  left: 14px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid hsl(0, 0%, 30%);
  border-radius: 9999px;
  color: hsl(0, 0%, 70%);
  font-size: 0.7rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.2s;
  z-index: 1;
}

.ad-unit-unmute-btn:hover {
  border-color: hsl(0, 0%, 55%);
}

/* Close (✕) button — top-right corner of the rewarded overlay */
.ad-unit-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid hsl(0, 0%, 28%);
  color: hsl(0, 0%, 40%);
  font-size: 1rem;
  line-height: 1;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  z-index: 10001;
}

.ad-unit-close-btn.ready {
  border-color: hsl(140, 70%, 50%);
  color: hsl(140, 80%, 60%);
  cursor: pointer;
}

.ad-unit-close-btn.ready:hover {
  background: rgba(20, 80, 40, 0.5);
}

.ad-unit-overlay-custom-link {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-unit-overlay-custom-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
