
/* =====================================================
   JLPTExam.org — Anime Push Notification Popup
   ===================================================== */

/* Main popup */
.jlpt-push-popup {
  position: fixed;
  top: 76px;
  left: 50%;
  right: auto;
  z-index: 999999;

  display: block;
  width: min(850px, calc(100vw - 32px));
  height: 340px;
  min-height: 0;
  max-height: calc(100vh - 90px);

  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;

  border: 1px solid #f1e4e8;
  border-radius: 22px;

  background-color: #fff;
  background-image: url("/assets/images/jlpt-push-banner.png");
  background-position: center center;
  background-size: 100% 100%;
  background-repeat: no-repeat;

  box-shadow: 0 18px 55px rgba(20, 50, 35, .22);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translate(-50%, -18px);

  transition:
    opacity .3s ease,
    transform .35s ease,
    visibility .3s ease;
}

/* Consistent sizing */
.jlpt-push-popup *,
.jlpt-push-popup *::before,
.jlpt-push-popup *::after {
  box-sizing: border-box;
}

/* Popup visible */
.jlpt-push-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* Hidden popup */
.jlpt-push-popup[hidden] {
  display: none !important;
}

/* Remove old emoji artwork */
.jlpt-push-popup .jlpt-push-art {
  display: none !important;
}

/* =====================================================
   Central white content panel
   ===================================================== */

.jlpt-push-popup .jlpt-push-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24%;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;

  width: 52%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 20px 22px 14px;
  overflow-y: auto;

  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .96);

  color: #183b29;
  font-family: inherit;
}

/* Small heading label */
.jlpt-push-popup .jlpt-push-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;

  padding-right: 30px;

  color: #16804a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.5;
}

.jlpt-push-popup .jlpt-push-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;

  border-radius: 50%;
  background: #20a45a;
  box-shadow: 0 0 0 4px #e6f6eb;
}

/* Close button */
.jlpt-push-popup .jlpt-push-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;

  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background: #f0f6f2;
  color: #496352;

  font-family: inherit;
  font-size: 23px;
  line-height: 1;

  cursor: pointer;

  transition:
    background .2s ease,
    transform .2s ease;
}

.jlpt-push-popup .jlpt-push-close:hover {
  background: #e0f1e5;
  transform: rotate(90deg);
}

/* Main heading */
.jlpt-push-popup .jlpt-push-content h2 {
  margin: 10px 0 8px;

  color: #173c28;
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.6px;
}

.jlpt-push-popup .jlpt-push-content h2 span {
  color: #16804a;
}

/* Description */
.jlpt-push-popup .jlpt-push-content > p:not(.jlpt-push-status) {
  margin: 0;

  color: #64756a;
  font-size: 12px;
  line-height: 1.6;
}

/* Benefits */
.jlpt-push-popup .jlpt-push-benefits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;

  margin: 10px 0;
}

.jlpt-push-popup .jlpt-push-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 6px 8px;

  border: 1px solid #e0efe4;
  border-radius: 30px;

  background: #f5fbf6;
  color: #376347;

  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

/* =====================================================
   Enable notification button
   ===================================================== */

.jlpt-push-popup .jlpt-push-enable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: 100%;
  min-height: 44px;
  flex-shrink: 0;
  margin: 0;
  padding: 11px 12px;

  border: 0;
  border-radius: 12px;

  background: linear-gradient(105deg, #117844, #20a45a);
  box-shadow: 0 6px 15px rgba(24, 128, 74, .2);

  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;

  cursor: pointer;

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.jlpt-push-popup .jlpt-push-enable:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(24, 128, 74, .28);
  filter: brightness(1.04);
}

.jlpt-push-popup .jlpt-push-enable:active {
  transform: translateY(0);
}

.jlpt-push-popup .jlpt-push-enable:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

/* Subscription status */
.jlpt-push-popup .jlpt-push-status {
  margin: 7px 0 0;

  color: #27633d;
  font-size: 11px;
  line-height: 1.5;
}

.jlpt-push-popup .jlpt-push-status:empty {
  display: none;
}

/* Maybe later */
.jlpt-push-popup .jlpt-push-later {
  display: block;
  align-self: center;

  margin: 7px auto 0;
  padding: 5px 12px;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: #64756a;

  font-family: inherit;
  font-size: 12px;

  cursor: pointer;

  transition:
    background .2s ease,
    color .2s ease;
}

.jlpt-push-popup .jlpt-push-later:hover {
  background: #f2f8f3;
  color: #16804a;
}

/* Privacy message */
.jlpt-push-popup .jlpt-push-privacy {
  margin-top: 7px;

  color: #89958d;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

/* =====================================================
   Tablet
   ===================================================== */

@media (max-width: 760px) and (min-width: 601px) {
  .jlpt-push-popup {
    width: min(720px, calc(100vw - 24px));
    height: 330px;
  }

  .jlpt-push-popup .jlpt-push-content {
    left: 22%;
    width: 58%;
    padding: 20px 16px 13px;
  }

  .jlpt-push-popup .jlpt-push-content h2 {
    font-size: 23px;
  }

  .jlpt-push-popup .jlpt-push-benefits span {
    padding: 5px 7px;
  }
}

/* =====================================================
   Mobile
   ===================================================== */

@media (max-width: 600px) {
  .jlpt-push-popup {
    top: 68px;
    left: 50%;

    width: calc(100vw - 20px);
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 80px);

    overflow-y: auto;
    border-radius: 17px;

    background-position: center center;
    background-size: cover;
  }

  .jlpt-push-popup .jlpt-push-content {
    position: relative;
    inset: auto;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 20px 16px 16px;

    overflow-y: visible;
    border-radius: 16px;

    background: rgba(255, 255, 255, .96);
  }

  .jlpt-push-popup .jlpt-push-eyebrow {
    font-size: 9px;
  }

  .jlpt-push-popup .jlpt-push-content h2 {
    margin-top: 12px;
    font-size: 23px;
  }

  .jlpt-push-popup .jlpt-push-content > p:not(.jlpt-push-status) {
    font-size: 12px;
  }

  .jlpt-push-popup .jlpt-push-benefits {
    gap: 5px;
    margin: 11px 0;
  }

  .jlpt-push-popup .jlpt-push-benefits span {
    padding: 6px 8px;
    font-size: 10px;
  }

  .jlpt-push-popup .jlpt-push-enable {
    min-height: 45px;
  }
}

/* Short screens */
@media (max-height: 560px) {
  .jlpt-push-popup {
    top: 10px;
    max-height: calc(100vh - 20px);
  }

  .jlpt-push-popup .jlpt-push-content {
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .jlpt-push-popup .jlpt-push-content h2 {
    margin-top: 8px;
  }

  .jlpt-push-popup .jlpt-push-benefits {
    margin: 7px 0;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .jlpt-push-popup,
  .jlpt-push-popup .jlpt-push-close,
  .jlpt-push-popup .jlpt-push-enable {
    transition: none;
  }
}


/* Temporary clean popup — artwork disabled */
.jlpt-push-popup {
  background-image: none !important;
  background-color: #ffffff !important;
  width: min(600px, calc(100vw - 32px)) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100vh - 100px) !important;
  overflow-y: auto !important;
  border: 1px solid #dcebe1 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(20, 50, 35, 0.18) !important;
}

/* Remove the old green emoji panel */
.jlpt-push-popup .jlpt-push-art {
  display: none !important;
}

/* Center the content */
.jlpt-push-popup .jlpt-push-content {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 28px 30px 22px !important;
  overflow: visible !important;
  background: #ffffff !important;
  border-radius: 20px !important;
}

/* Keep the heading and buttons compact */
.jlpt-push-popup .jlpt-push-content h2 {
  font-size: clamp(23px, 3vw, 28px) !important;
  margin: 15px 0 10px !important;
}

.jlpt-push-popup .jlpt-push-benefits {
  margin: 14px 0 !important;
}

.jlpt-push-popup .jlpt-push-enable {
  min-height: 48px !important;
}

/* Mobile */
@media (max-width: 600px) {
  .jlpt-push-popup {
    top: 68px !important;
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 80px) !important;
  }

  .jlpt-push-popup .jlpt-push-content {
    padding: 24px 18px 20px !important;
  }

  .jlpt-push-popup .jlpt-push-content h2 {
    font-size: 23px !important;
  }
}

