/* =========================================================
 * Phase 1 Popup CSS
 * Normal posts / CPT popup only
 * ========================================================= */
:root{
  --fpg-popup-image-width:42%;
  --fpg-popup-content-padding:32px;
  --fpg-popup-title-color:#111827;
  --fpg-popup-text-color:#374151;
  --fpg-popup-meta-color:#6b7280;
  --fpg-popup-button-bg:#120c7a;
  --fpg-popup-button-text:#ffffff;
}

.fpg-popup-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:999999;
}

.fpg-popup-overlay.is-open{
  display:flex;
}

.fpg-popup-dialog{
  width:min(100%, 920px);
  max-height:90vh;
  overflow:hidden;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  position:relative;
}

.fpg-popup-close{
  position:absolute;
  top:14px;
  right:14px;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:#fff;
  color:#111827;
  cursor:pointer;
  z-index:4;
  box-shadow:0 8px 24px rgba(15,23,42,.16);
  font-size:22px;
  line-height:1;
}

.fpg-popup-scroll{
  max-height:90vh;
  overflow:auto;
}

.fpg-popup-loader,
.fpg-popup-error{
  padding:56px 28px;
  text-align:center;
  font-size:15px;
  color:#4b5563;
}

.fpg-popup-shell{
  display:grid;
  grid-template-columns:var(--fpg-popup-image-width) calc(100% - var(--fpg-popup-image-width));
  min-height:420px;
  background:#fff;
}

.fpg-popup-media{
  background:#f4f5f7;
}

.fpg-popup-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.fpg-popup-content{
  padding:var(--fpg-popup-content-padding);
  color:var(--fpg-popup-text-color);
}

.fpg-popup-eyebrow{
  margin:0 0 10px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--fpg-popup-meta-color);
}

.fpg-popup-title{
  margin:0 0 10px;
  font-size:clamp(24px,2.4vw,34px);
  line-height:1.2;
  color:var(--fpg-popup-title-color);
}

.fpg-popup-title a{
  color:inherit;
  text-decoration:none;
}

.fpg-popup-categories{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}

.fpg-popup-category-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
  font-size:13px;
  font-weight:600;
}

.fpg-popup-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-bottom:18px;
  color:var(--fpg-popup-meta-color);
  font-size:14px;
}

.fpg-popup-content-text{
  color:var(--fpg-popup-text-color);
  font-size:15px;
  line-height:1.75;
  margin-bottom:18px;
}

.fpg-popup-custom-fields{
  margin:18px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}

.fpg-popup-custom-fields li{
  display:flex;
  gap:8px;
  align-items:flex-start;
  color:var(--fpg-popup-text-color);
  font-size:14px;
}

.fpg-popup-shortcode{
  margin-top:18px;
}

.fpg-popup-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.fpg-popup-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:12px 18px;
  border-radius:10px;
  border:0;
  text-decoration:none;
  background:var(--fpg-popup-button-bg);
  color:var(--fpg-popup-button-text);
  font-weight:600;
}

.fpg-popup-btn:hover{
  color:var(--fpg-popup-button-text);
}

body.fpg-popup-open{
  overflow:hidden;
}

@media (max-width:767px){
  .fpg-popup-overlay{
    padding:12px;
  }

  .fpg-popup-shell{
    grid-template-columns:1fr;
  }

  .fpg-popup-content{
    padding:20px 18px;
  }
}


.fpg-popup-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:999999;
}

.fpg-popup-overlay.is-open{
  display:flex;
}

.fpg-popup-dialog{
  width:min(100%, 920px);
  max-height:90vh;
  overflow:hidden;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  position:relative;
}

.fpg-popup-loader,
.fpg-popup-error{
  padding:56px 28px;
  text-align:center;
  font-size:15px;
  color:#4b5563;
}