/* ==========================================================
   popupmanager — base modal + modern cards (lightweight)
   Author: GTF
   ========================================================== */

html.pm-lock, html.pm-lock body { overflow: hidden !important; }

.pm-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.pm-modal.is-open{ display: block; }

.pm-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.pm-dialog{
  position: relative;
  width: min(920px, calc(100vw - 24px));
  max-height: 80vh;
  overflow: auto;
  margin: 60px auto;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.pm-close{
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

/* ===== Popup content styles (cards) ===== */
.pm-popup-wrap{ padding: 0 2px 6px; }

.pm-title{
  margin: 0 0 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.pm-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pm-card{
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 10px rgba(0,0,0,.04);
}

.pm-card__head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pm-badge{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9f7ee;
  color: #1c7c3a;
  font-weight: 800;
  flex: 0 0 auto;
}

.pm-card__title{
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.pm-card__text{
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #444;
}

.pm-note{
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #e0e0e0;
  border-radius: 10px;
  font-size: 13px;
  color: #444;
  background: rgba(0,0,0,.02);
}

.pm-note code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0,0,0,.06);
}

@media (max-width: 992px){
  .pm-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px){
  .pm-dialog{ margin: 18px auto; max-height: 88vh; }
  .pm-title{ font-size: 18px; }
  .pm-grid{ grid-template-columns: 1fr; gap: 10px; }
}
