/* =============================================
   mws-overlay.css
   Overlay popup for mamyWorkSheet download cards
   Usage: include AFTER the main template CSS
   ============================================= */

/* ---- Black overlay ---- */
.mws-overlay-black {
  background-color: #000;
  display: none;
  height: 100%;
  left: 0;
  opacity: 0.8;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1001;
}

/* ---- Popup box (loading / message) ---- */
.mws-popup-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: none;
  left: 50%;
  max-width: 90vw;
  padding: 0;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  z-index: 1002;
}

.mws-popup-inner {
  align-items: center;
  background:
    url('https://mamyworksheet.com/templates/brightside_en/images/preview-text-back.gif')
    no-repeat center;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.mws-popup-title {
  color: #333;
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.mws-popup-loading {
  display: block;
  margin: 0 auto;
}

.mws-popup-message {
  color: #555;
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

.mws-popup-close {
  background: #600;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  transition: background 0.2s;
}

.mws-popup-close:hover {
  background: #800;
}

/* ---- Download button state ---- */
.mws-popup-download-btn {
  background: #2f8ad2;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1rem;
  padding: 0.65rem 2rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.mws-popup-download-btn:hover {
  background: #236ea8;
  transform: translateY(-1px);
}

/* ---- Utility: hidden ---- */
.mws-hidden {
  display: none !important;
}
