/**
 * monetag-ads.css
 * Styles for Monetag ad placements in SimpleTCF:
 *  - Sticky footer banner (always visible during practice)
 *  - Question-counter modal (shown after every 19 questions)
 */

/* -----------------------------------------------------------------------
   Sticky Footer Banner
   ----------------------------------------------------------------------- */

#monetag-sticky-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 48px 6px 8px; /* right padding for close button */
  min-height: 60px;
  animation: monetag-slide-up 0.35s ease-out;
}

#monetag-sticky-banner.monetag-banner--hidden {
  display: none;
}

.monetag-sticky__label {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 10px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  user-select: none;
}

.monetag-sticky__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
}

.monetag-sticky__close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #666;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.monetag-sticky__close:hover,
.monetag-sticky__close:focus {
  background: #f0f0f0;
  color: #333;
  outline: none;
}

/* -----------------------------------------------------------------------
   Question-Counter Modal
   ----------------------------------------------------------------------- */

#monetag-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: monetag-fade-in 0.25s ease-out;
}

#monetag-modal-overlay.monetag-modal--hidden {
  display: none;
}

.monetag-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 16px;
  max-width: 420px;
  width: 90%;
  animation: monetag-scale-in 0.25s ease-out;
}

.monetag-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.monetag-modal__label {
  font-size: 11px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.monetag-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #666;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.monetag-modal__close:hover,
.monetag-modal__close:focus {
  background: #f0f0f0;
  color: #333;
  outline: none;
}

.monetag-modal__content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  background: #f9f9f9;
  border-radius: 6px;
}

/* -----------------------------------------------------------------------
   Animations
   ----------------------------------------------------------------------- */

@keyframes monetag-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes monetag-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes monetag-scale-in {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* -----------------------------------------------------------------------
   Responsive adjustments
   ----------------------------------------------------------------------- */

@media (max-width: 480px) {
  #monetag-sticky-banner {
    padding: 4px 44px 4px 6px;
    min-height: 54px;
  }

  .monetag-modal__dialog {
    padding: 12px;
    width: 95%;
  }

  .monetag-modal__content {
    min-height: 200px;
  }
}
