/* ==========================================================================
   DMK Public Profile – SCOPED STYLES
   Everything lives under .dmk-pp to avoid conflicts.
   ========================================================================== */

.dmk-pp {
  --pp-yellow: #FFC633;
  --pp-purple: #6A35FF;
  --pp-text: #111111;
  --pp-muted: #6b7280;
  --pp-card-bg: #ffffff;
  --pp-shadow: 0 6px 24px rgba(0,0,0,.06);
}

/* Layout container */
.dmk-pp .dmk-container {
  max-width: 860px;
  margin: 24px auto;
  padding: 0 16px;
}

/* Card */
.dmk-pp .dmk-card {
  background: var(--pp-card-bg);
  border-radius: 16px;
  box-shadow: var(--pp-shadow);
  padding: 18px;
  margin-bottom: 20px;
}

/* ==========================================================================
   Profile Header
   - Row 1: avatar (left) + follow button (right)
   - Row 2: name(+badge), username, bio
   - Row 3: socials
   Report icon sits at top-right of the card.
   ========================================================================== */

.dmk-pp .dmk-profile-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Report icon (top-right) */
.dmk-pp .dmk-report-fab {
  position: absolute;
  top: 10px;
  right: 10px;
}
.dmk-pp .dmk-report-btn {
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  line-height: 0;
  border-radius: 10px;
  transition: transform .15s ease, background-color .15s ease;
}
.dmk-pp .dmk-report-btn:hover { background: rgba(0,0,0,.05); transform: translateY(-1px); }
.dmk-pp .dmk-report-btn img { width: 18px; height: 18px; display: block; filter: none !important; }

/* Row 1: avatar left, follow right */
.dmk-pp .dmk-avatar-row {
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes follow button to right */
  gap: 12px;
  width: 100%;
}

/* Bigger avatar (works with get_avatar output <img class="dmk-avatar">) */
.dmk-pp .dmk-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  flex: 0 0 auto;
}

/* Follow button wrapper (right side) */
.dmk-pp .dmk-actions-side {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Row 2: name / username / bio */
.dmk-pp .dmk-name-stack { margin-top: 4px; }
.dmk-pp .dmk-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dmk-pp .dmk-name     { font-size: 22px; margin: 0; font-weight: 700; color: var(--pp-text); }
.dmk-pp .dmk-verified img { width: 18px; height: 18px; display: inline-block; filter: none !important; }
.dmk-pp .dmk-username { color: var(--pp-muted); font-weight: 600; display: block; margin-top: 4px; }
.dmk-pp .dmk-bio      { margin-top: 10px; color: var(--pp-text); }
.dmk-pp .dmk-bio p    { margin: 0 0 8px; }
.dmk-pp .dmk-bio-empty { color: var(--pp-muted); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.dmk-pp .dmk-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  transition: all .2s ease;
}

/* Follow (primary gradient) */
.dmk-pp .dmk-follow-btn {
  max-width: 135px;         /* keeps a nice width */
  text-align: center;
}
.dmk-pp .dmk-follow-btn.is-follow {
  background: linear-gradient(90deg, var(--pp-yellow) 0%, var(--pp-purple) 100%);
  color: #111;
  box-shadow: 0 4px 14px rgba(106,53,255,.25);
}
.dmk-pp .dmk-follow-btn.is-follow:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Following (outline) */
.dmk-pp .dmk-follow-btn.is-following {
  background: #fff;
  border: 2px solid var(--pp-purple);
  color: var(--pp-purple);
}
.dmk-pp .dmk-follow-btn.is-following:hover { background: rgba(106,53,255,0.06); }

/* Report submit */
.dmk-pp .dmk-btn-report { background: var(--pp-purple); color: #fff; }
.dmk-pp .dmk-btn-report:hover { filter: brightness(1.05); }

/* ==========================================================================
   Stats Row
   ========================================================================== */

.dmk-pp .dmk-stats-row {
  display: flex;
  gap: 20px;
  margin: 8px 0 0;
  color: var(--pp-text);
}
.dmk-pp .dmk-stat { cursor: pointer; font-size: 14px; font-weight: 600; }
.dmk-pp .dmk-stat strong { font-size: 16px; margin-right: 6px; }

/* ==========================================================================
   Socials – show SVGs as-is, with subtle hover shadow
   ========================================================================== */

.dmk-pp .dmk-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

/* No yellow pill; keep your SVG colors. Add gentle hover halo. */
.dmk-pp .dmk-social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  background: transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dmk-pp .dmk-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.dmk-pp .dmk-social-icon {
  width: 20px;
  height: 20px;
  display: block;
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  background: transparent !important;
}

/* ==========================================================================
   Posts Grid (image-first)
   ========================================================================== */

.dmk-pp .dmk-posts-grid h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }

.dmk-pp .dmk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.dmk-pp .dmk-post-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,.04);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dmk-pp .dmk-post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(0,0,0,.06); }
.dmk-pp .dmk-post-thumb img { width: 100%; height: auto; display: block; }
.dmk-pp .dmk-post-info { padding: 12px; }
.dmk-pp .dmk-post-title { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--pp-text); }

/* Metric chips: compact + aligned */
.dmk-pp .dmk-post-meta {
  font-size: 13px;
  color: #666;
  display: flex;
  gap: 12px;
  align-items: center;
}
.dmk-pp .dmk-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.dmk-pp .dmk-metric img {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
  filter: none !important;
}

/* ==========================================================================
   User List (followers/following)
   ========================================================================== */

.dmk-pp .dmk-user-list { list-style: none; margin: 0; padding: 0; }
.dmk-pp .dmk-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.dmk-pp .dmk-avatar-sm { border-radius: 50%; width: 36px; height: 36px; }
.dmk-pp .dmk-user-link { font-weight: 600; color: var(--pp-text); text-decoration: none; }
.dmk-pp .dmk-user-link:hover { text-decoration: underline; }
.dmk-pp .dmk-handle { font-size: 13px; color: var(--pp-muted); margin-left: 4px; }
.dmk-pp .dmk-user-item .dmk-verified img { width: 16px; height: 16px; vertical-align: -3px; }

/* ==========================================================================
   Modals (centered, full-viewport overlay)
   ========================================================================== */

.dmk-pp .dmk-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  margin-top: 80px;
}
.dmk-pp .dmk-modal.show { display: flex; }

.dmk-pp .dmk-modal-content {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 420px;
  max-height: 80%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--pp-shadow);
  z-index: 100000;
}

@keyframes fadeInUp{
    from { opacity: 0; transform: translateY(20px); }
    from { opacity: 1; transform: translateY(0); }
}

.dmk-pp .dmk-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.dmk-pp .dmk-modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; }

.dmk-pp .dmk-modal-body { padding: 14px 16px; overflow-y: auto; }
.dmk-pp .dmk-modal-close { background: none; border: 0; font-size: 20px; cursor: pointer; line-height: 1; }

/* Loading text / response area */
.dmk-pp .dmk-loading { color: #666; font-size: 14px; text-align: center; padding: 14px 0; }

/* Report form */
.dmk-pp #dmk-report-form textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  outline: none;
  resize: vertical;
}
.dmk-pp #dmk-report-form textarea:focus {
  border-color: var(--pp-purple);
  box-shadow: 0 0 0 3px rgba(106,53,255,.12);
}

/* Body scroll lock on modal open */
.dmk-no-scroll { overflow: hidden; }

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */

@media (max-width: 600px) {
  .dmk-pp .dmk-name { font-size: 18px; }
  .dmk-pp .dmk-post-title { font-size: 14px; }

  /* Keep follow button right even on small phones */
  .dmk-pp .dmk-avatar-row { gap: 10px; }
  .dmk-pp .dmk-follow-btn { min-width: 120px; }
}
