/* ================================
   KONG UI — V3 LAYOUT PATCH (SAFE)
   - Forces overlay hidden by default (prevents black screen)
   - Vertical stacked layout when open
   ================================ */

/* HARD SAFETY: overlay hidden unless explicitly opened */
#kong-overlay { display: none !important; }
#kong-overlay.kong-open { 
  display: flex !important;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.72);
  z-index: 99999;
}

/* Make content stack vertically */
#kong-overlay.kong-open { flex-direction: column; }

.kong-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,0.10);
  width:min(720px, 100%);
  background:#0c0c0c;
  border-left:1px solid rgba(255,255,255,0.12);
  border-right:1px solid rgba(255,255,255,0.12);
  border-top-left-radius:18px;
  border-top-right-radius:18px;
}

.kong-body{
  width:min(720px, 100%);
  max-height:min(66vh, 620px);
  overflow:auto;
  padding:14px;
  background:#0c0c0c;
  border-left:1px solid rgba(255,255,255,0.12);
  border-right:1px solid rgba(255,255,255,0.12);
  display:flex;
  flex-direction:column;
  gap:12px;
}

.kong-footer{
  width:min(720px, 100%);
  padding:14px;
  border-top:1px solid rgba(255,255,255,0.10);
  background:#0c0c0c;
  border-left:1px solid rgba(255,255,255,0.12);
  border-right:1px solid rgba(255,255,255,0.12);
  border-bottom-left-radius:18px;
  border-bottom-right-radius:18px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* Cards + text */
.kong-card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 14px;
}

.kong-h3{ margin:0 0 10px 0; font-size:18px; font-weight:900; }
.kong-p{ margin:0; line-height:1.45; white-space: pre-line; }

/* Choices stacked */
.kong-choices{ display:flex; flex-direction:column; gap:10px; }
.kong-choice{
  width:100%;
  text-align:left;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-weight:900;
  cursor:pointer;
}
.kong-choice:hover{ background: rgba(255,255,255,0.10); }

/* Checklist stacked */
.kong-list{ display:flex; flex-direction:column; gap:10px; }
.kong-check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  padding:12px;
}
.kong-check input{ margin-top:2px; }

/* Buttons */
.kong-btn{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,0.25);
  background:#f3f2ee;
  color:#111;
  font-weight:900;
  cursor:pointer;
}
.kong-btn-secondary{
  background: transparent;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.18);
}

/* Close button */
.kong-close{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
}
