/* =========================================================
   WP Daily Post Merger – Frontend Styles (CLEAN & FINAL)
   ========================================================= */

/* ---------- RESET / BASE ---------- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: #020617;
}

/* ---------- DASHBOARD GRID ---------- */
.wtpm-dashboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* mobile */
  gap: 12px;
  padding: 12px;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .wtpm-dashboard { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .wtpm-dashboard { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- CARD ---------- */
.wtpm-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(circle at top, rgba(255,255,255,0.12), rgba(13,16,31,0.96));
  box-shadow: 0 16px 40px rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.wtpm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.9);
}

/* ---------- IMAGE ---------- */
.wtpmp-preview-img {
    width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #111827;
  transition: filter .25s ease, opacity .25s ease;
  pointer-events: auto; /* ✅ यह line ADD करें */
  cursor: pointer; /* ✅ Cursor pointer बनाएं */
}

@media (max-width: 480px) {
  .wtpmp-preview-img { height: 160px; }
}

/* ---------- BLUR STATE ---------- */
.wtpm-blur {
  filter: blur(4px);
  opacity: 0.85;
}

/* ---------- SKELETON ---------- */
.wtpm-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 200% 100%;
  animation: wtpm-skeleton-shimmer 1.2s infinite;
  z-index: 1;
  pointer-events: none; /* ✅ यह line ADD करें */
}

@keyframes wtpm-skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- LOADER ---------- */
.wtpm-loader-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
  z-index: 2;
  pointer-events: none; /* ✅ यह line ADD करें */
}

.wtpm-loader-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.4);
  border-top-color: #facc15;
  animation: wtpm-spin 1s linear infinite;
}

@keyframes wtpm-spin {
  to { transform: rotate(360deg); }
}

/* ---------- CARD FOOTER ---------- */
.wtpm-card .card-body {
  padding: 12px;
  display: flex;
  justify-content: center;
}

/* ---------- DOWNLOAD BUTTON ---------- */
.wtpmp-download-btn {
  position: relative;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  text-decoration: none;
  background: linear-gradient(120deg, #facc15, #f97316);
  color: #111827;
  box-shadow: 0 10px 30px rgba(250,204,21,0.45);
  transition: transform .15s ease, box-shadow .2s ease;
}

.wtpmp-download-btn:hover {
  transform: translateY(-1px);
}

.wtpmp-download-btn:active {
  transform: scale(.98);
}

/* ---------- GOLD SHINE EFFECT ---------- */
.wtpmp-download-btn::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -60%;
  width: 40%;
  height: 140%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0),
    rgba(255,255,255,.5),
    rgba(255,255,255,0)
  );
  transform: skewX(-20deg);
  opacity: 0;
}

.wtpmp-download-btn:hover::after {
  animation: wtpm-shine 0.8s linear;
}

@keyframes wtpm-shine {
  from { left: -60%; opacity: 1; }
  to   { left: 140%; opacity: 0; }
}

/* ---------- PURE PREVIEW MODAL (NO BOOTSTRAP) ---------- */
.wtpm-preview-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
  z-index: 99999;
}

.wtpm-preview-modal.active {
  display: flex;
}

.wtpm-preview-modal img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 14px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.9);
}

.wtpm-preview-close {
  position: absolute;
  top: 20px;
  right: 26px;
  font-size: 34px;
  color: #fff;
  cursor: pointer;
}

/* ---------- MOBILE OPTIMIZATION ---------- */
@media (max-width: 767px) {
  .wtpm-dashboard {
    gap: 10px;
    padding: 8px;
  }

  .wtpm-card:hover {
    transform: none;
  }

  .wtpmp-download-btn {
    padding: 12px 22px;
    font-size: 15px;
  }
}

/* =====================================
   REMOVE ALL WHITE MARGIN / GAP
===================================== */

/* Reset html & body */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #020617;
}

/* Kill theme wrapper spacing */
.site,
.site-content,
.site-main,
.content-area,
#page,
#content,
#primary,
#main {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

/* Remove header / top spacing if theme adds */
header,
.site-header {
  margin: 0;
  padding: 0;
}

/* Container override */
.container,
.container-fluid,
.wrap,
.wrapper {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Your dashboard full width */
.wtpmp-page-bg,
.wtpmp-dashboard-wrap,
.wtpm-dashboard {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Mobile safe */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
}

/* Remove admin bar gap */
@media screen and (max-width: 600px) {
  html {
    margin-top: 0 !important;
  }
  
  #wpadminbar {
    position: fixed;
  }
}