/* ======================================================
   GENERIC MODAL
   Project: iShare®
   Purpose: Reusable modal windows (policy, offer, etc.)
   ====================================================== */

/* Base modal overlay */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
  padding:20px;
}

/* Modal content container */
.modal .modal-content{
  background:#fff;
  color:#000;

  width:min(900px, 100%);
  max-height:90vh;
  overflow:hidden;

  border-radius:18px;
  box-shadow:0 12px 30px rgba(0,0,0,.25);

  padding:22px;
  font-family:'Roboto', sans-serif;
}

/* Scrollable inner area */
.modal .modal-scroll{
  overflow:auto;
  max-height:65vh;
  padding-right:8px;
}

/* Close buttons inside modals (generic) */
.modal-close{
  background:none;
  border:none;
  font-size:24px;
  cursor:pointer;
  line-height:1;
}

/* Utility: show modal (if needed via class) */
.modal.show{
  display:flex;
}

body.modal-open{
  overflow:hidden;
}

.deck-modal{
  padding:18px;
  z-index:10010;
}

.deck-modal .modal-content{
  width:min(1240px, 100%);
  max-height:92vh;
  padding:0;
  border-radius:18px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.deck-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  background:#0f172a;
  color:#f8fafc;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.deck-modal-head h2{
  margin:0;
  font-size:1rem;
  letter-spacing:.02em;
}

.deck-modal-head .modal-close{
  color:#f8fafc;
  width:38px;
  height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  transition:background .2s ease;
}

.deck-modal-head .modal-close:hover{
  background:rgba(255,255,255,.12);
}

.deck-modal-frame-wrap{
  background:#18181b;
  height:min(86vh, 900px);
}

.deck-modal-frame-wrap iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

.deck-modal-backdrop{
  display:none;
}

@media (max-width: 768px){
  .deck-modal{
    padding:8px;
  }

  .deck-modal .modal-content{
    max-height:96vh;
    border-radius:14px;
  }

  .deck-modal-head{
    padding:10px 12px;
  }

  .deck-modal-head h2{
    font-size:.92rem;
  }

  .deck-modal-frame-wrap{
    height:84vh;
  }
}
