/* =============================================
   CHAT UI — IMPROVED DESIGN PATCH
   Paste this after your existing app.css
   ============================================= */

/* ── CSS Variables override for chat ── */
:root {
  --chat-bg:          #0a0d12;
  --chat-surface:     #111620;
  --chat-border:      rgba(255,255,255,.07);
  --chat-me-from:     #2460e6;
  --chat-me-to:       #4fa3f7;
  --chat-them-bg:     rgba(255,255,255,.07);
  --chat-them-border: rgba(255,255,255,.10);
  --chat-input-bg:    rgba(255,255,255,.05);
  --chat-radius-lg:   22px;
  --chat-radius-sm:   6px;
  --chat-radius-tail: 4px;
  --lf-trust-blue: #60A5FA;
  --lf-trust-blue-soft: rgba(96,165,250,.35);
  --lf-trust-blue-hover: rgba(96,165,250,.55);
  --lf-trust-blue-bg: rgba(96,165,250,.06);
}

/* ══════════════════════════════════════════
   CHAT PAGE WRAPPER
══════════════════════════════════════════ */

.lfpage:has(#lfChatList) {
  background: var(--chat-bg);
  min-height: 100vh;
  border-radius: 20px;
}

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */

.lfmsg-top {
  padding: 14px 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--chat-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

#lfChatAvatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #1a3a7c, #2460e6) !important;
  border: 2px solid rgba(74,144,255,.30) !important;
  box-shadow: 0 0 0 3px rgba(74,144,255,.08) !important;
}

#lfChatPeerName {
  font-family: var(--lf-font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.2px;
  color: rgba(255,255,255,.95);
}

#lfChatSubtitle {
  font-family: var(--lf-font-mono);
  font-size: 11px;
  letter-spacing: .3px;
  color: rgba(255,255,255,.35);
  margin-top: 1px;
}

/* ══════════════════════════════════════════
   CHAT CARD + MESSAGE LIST
══════════════════════════════════════════ */

/* Remove card box — make it feel native */
.lfcard:has(#lfChatList) {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-top: 0 !important;
}

#lfChatList {
  padding: 20px 16px 12px !important;
  height: 58vh !important;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-behavior: smooth;

  /* custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.10) transparent;
}

#lfChatList::-webkit-scrollbar { width: 4px; }
#lfChatList::-webkit-scrollbar-track { background: transparent; }
#lfChatList::-webkit-scrollbar-thumb {
  background: var(--lf-item-bg-hover);
  border-radius: 99px;
}

/* ══════════════════════════════════════════
   DATE DIVIDERS
══════════════════════════════════════════ */

.lfchat-date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
  color: rgba(255,255,255,.28);
  font-family: var(--lf-font-mono);
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.lfchat-date-divider::before,
.lfchat-date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}

/* ══════════════════════════════════════════
   MESSAGE ROWS
══════════════════════════════════════════ */

.lfchat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 2px 0;
  animation: lfchat-in .22s cubic-bezier(.2,.8,.4,1) both;
}

@keyframes lfchat-in {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lfchat-row-me {
  justify-content: flex-end;
}

/* Small avatar for "them" side */
.lfchat-row:not(.lfchat-row-me) .lfchat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a2a4a, #243a6a);
  border: 1.5px solid rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  margin-bottom: 2px;
}

.lfchat-row:not(.lfchat-row-me) .lfchat-avatar svg {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,.6);
}

/* ══════════════════════════════════════════
   BUBBLES
══════════════════════════════════════════ */

.lfchat-bubble {
  max-width: min(68%, 520px);
  padding: 10px 14px;
  border-radius: var(--chat-radius-lg);
  font-family: var(--lf-font-sans);
  font-size: 14.5px;
  font-weight: 450;
  line-height: 1.5;
  position: relative;
  transition: transform .12s ease;
}

.lfchat-bubble:active {
  transform: scale(.98);
}

/* ── THEIR messages ── */
.lfchat-row:not(.lfchat-row-me) .lfchat-bubble {
  background: var(--chat-them-bg);
  border: 1px solid var(--chat-them-border);
  color: rgba(255,255,255,.90);
  border-bottom-left-radius: 18px;
  box-shadow:
    0 1px 2px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.05);
}

/* ── MY messages ── */
.lfchat-bubble-me {
  background: linear-gradient(145deg, var(--chat-me-from), var(--chat-me-to)) !important;
  border: none !important;
  color: #ffffff !important;
  border-bottom-right-radius: var(--chat-radius-tail) !important;
  box-shadow:
    0 4px 20px rgba(36,96,230,.35),
    0 1px 3px rgba(36,96,230,.25),
    inset 0 1px 0 rgba(255,255,255,.15) !important;
}

/* "Tail" indicators via pseudo-elements */
.lfchat-row:not(.lfchat-row-me) .lfchat-bubble::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5px;
  width: 12px;
  height: 12px;
  background: var(--chat-them-bg);
  border-left: 1px solid var(--chat-them-border);
  border-bottom: 1px solid var(--chat-them-border);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

 .lfchat-row:not(.lfchat-row-me) .lfchat-bubble::before,
 .lfchat-row:not(.lfchat-row-me) .lfchat-bubble::after {
   display: none;
 }

.lfchat-bubble-me::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: -5px;
  width: 12px;
  height: 12px;
  background: var(--chat-me-to);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* ── Consecutive messages: remove tail on non-last ── */
.lfchat-row:not(.lfchat-row-me) + .lfchat-row:not(.lfchat-row-me) .lfchat-bubble::before,
.lfchat-row-me + .lfchat-row-me .lfchat-bubble-me::before {
  display: none;
}

/* Tighter gap between consecutive same-side bubbles */
.lfchat-row:not(.lfchat-row-me) + .lfchat-row:not(.lfchat-row-me),
.lfchat-row-me + .lfchat-row-me {
  margin-top: 1px;
}

.lfchat-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14.5px;
  letter-spacing: -.1px;
}

/* ══════════════════════════════════════════
   IMAGES IN BUBBLES
══════════════════════════════════════════ */

.lfchat-imgwrap {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
}

.lfchat-img {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 3 / 4; /* reserve space before load */
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
  opacity: 1;
}

/* hydrated images fade in */
.lfchat-img:not(.lfimg-loaded) { opacity: 0; }

.lfchat-img.lfimg-loaded {
  opacity: 1;
}

.lfchat-img:not([src]),
.lfchat-img[src=""] {
  opacity: 0;
}

/* ══════════════════════════════════════════
   TIMESTAMPS & STATUS
══════════════════════════════════════════ */

.lfchat-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  opacity: 0;
  padding: 0 4px;
  margin-top: 3px;
  font-family: var(--lf-font-mono);
  font-size: 10.5px;
  color: rgba(255,255,255,.40);
  transition: opacity .2s ease;
}

/* Show meta on hover of the row */
.lfchat-row:hover .lfchat-meta {
  opacity: 1;
}

.lfchat-meta-me {
  justify-content: flex-end;
}

.lfchat-status svg {
  width: 13px;
  height: 13px;
}

/* ══════════════════════════════════════════
   TYPING INDICATOR
══════════════════════════════════════════ */

#lfChatTyping.lfchat-typing {
  gap: 0;
  align-items: center;
  padding: 10px 16px;
  min-height: 40px;
}

/* Animated dots */
.lfchat-typing-dot {
  display: inline-flex;
  gap: 4px;
}

.lfchat-typing-dot::before,
.lfchat-typing-dot::after,
.lfchat-typing-dot {
  /* We'll override the single dot span with a 3-dot animation */
}

/* Replace typing dot span with animated dots */
#lfChatTyping .lfchat-typing-dot {
  display: inline-flex;
  gap: 4px;
  margin-right: 8px;
}

#lfChatTyping .lfchat-typing-dot::before {
  content: '●';
  font-size: 8px;
  color: rgba(74,144,255,.7);
  animation: lftype-bounce .9s ease-in-out infinite;
  animation-delay: 0s;
}

#lfChatTyping .lfchat-typing-dot::after {
  content: '● ●';
  font-size: 8px;
  color: rgba(74,144,255,.7);
  animation: lftype-bounce .9s ease-in-out infinite;
  animation-delay: .2s;
  letter-spacing: 4px;
}

@keyframes lftype-bounce {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30%            { opacity: 1;  transform: translateY(-3px); }
}

#lfChatTyping span:last-child {
  font-family: var(--lf-font-sans);
  font-size: 13px;
  color: rgba(255,255,255,.40);
  font-style: italic;
}

/* ══════════════════════════════════════════
   INPUT AREA
══════════════════════════════════════════ */

#lfChatForm {
  display: flex;
  gap: 8px !important;
  align-items: center;
  padding: 10px 14px !important;
  background: rgba(10,13,18,.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 0 !important;
  position: sticky;
  bottom: 0;
}

/* Input field */
#lfChatInput.lfinput {
  flex: 1;
  height: 44px;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(255,255,255,.09) !important;
  background: var(--lf-item-bg) !important;
  color: rgba(255,255,255,.92) !important;
  font-family: var(--lf-font-sans) !important;
  font-size: 14.5px !important;
  font-weight: 450 !important;
  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

#lfChatInput.lfinput::placeholder {
  color: rgba(255,255,255,.28) !important;
  font-style: italic;
}

#lfChatInput.lfinput:focus {
  border-color: rgba(74,144,255,.45) !important;
  background: var(--lf-item-bg-hover) !important;
  box-shadow:
    0 0 0 3px rgba(74,144,255,.10),
    0 4px 16px rgba(0,0,0,.25) !important;
  outline: none;
}

/* Attachment & Gift buttons */
#lfChatAttach,
#lfChatGift {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,.09) !important;
  background: var(--lf-item-bg) !important;
  color: rgba(255,255,255,.55) !important;
  display: grid;
  place-items: center !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

#lfChatAttach:hover,
#lfChatGift:hover {
  background: var(--lf-item-bg-hover) !important;
  color: rgba(255,255,255,.85) !important;
  border-color: rgba(255,255,255,.18) !important;
}

/* Send button */
#lfChatSend.lfbtn {
  height: 44px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #1d57d4, #4fa3f7) !important;
  border: none !important;
  font-family: var(--lf-font-sans) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: -.1px !important;
  gap: 7px !important;
  box-shadow:
    0 4px 18px rgba(36,96,230,.40),
    inset 0 1px 0 rgba(255,255,255,.20) !important;
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    filter .12s ease !important;
}

#lfChatSend.lfbtn:hover {
  filter: brightness(1.08) !important;
  box-shadow:
    0 6px 24px rgba(36,96,230,.50),
    inset 0 1px 0 rgba(255,255,255,.22) !important;
  transform: translateY(-1px) !important;
}

#lfChatSend.lfbtn:active {
  transform: scale(.95) translateY(0) !important;
}

/* ══════════════════════════════════════════
   GIFT MODAL
══════════════════════════════════════════ */

#lfGiftModal .lfmodal-card {
  background: var(--lf-card-bg);
  border: 1px solid var(--lf-line);
  border-radius: 20px;
  box-shadow: var(--lf-shadow-lg);
  backdrop-filter: blur(20px);
}

#lfGiftList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ══════════════════════════════════════════
   EMPTY / LOADING STATES
══════════════════════════════════════════ */

#lfChatList .lfmuted {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto;
  font-family: var(--lf-font-sans);
  font-size: 14px;
  color: rgba(255,255,255,.28);
}

/* ══════════════════════════════════════════
   ERROR MESSAGE
══════════════════════════════════════════ */

#lfChatErr {
  font-family: var(--lf-font-sans);
  font-size: 13px;
  color: #ff6b6b;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,60,60,.08);
  border: 1px solid rgba(255,60,60,.18);
}

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */

@media (max-width: 520px) {
  #lfChatList {
    padding: 14px 12px 8px !important;
    height: 62vh !important;
  }

  .lfchat-bubble {
    max-width: 82%;
    font-size: 14px;
  }

  #lfChatForm {
    padding: 8px 10px !important;
    gap: 6px !important;
  }

  #lfChatAttach,
  #lfChatGift {
    width: 40px !important;
    height: 40px !important;
  }

  #lfChatInput.lfinput {
    height: 40px !important;
    font-size: 14px !important;
  }

  #lfChatSend.lfbtn {
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
  }
}

/* ══════════════════════════════════════════
   BACK BUTTON
══════════════════════════════════════════ */

.lfmsg-top .lfbtn-ghost {
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  background: var(--lf-item-bg) !important;
  font-family: var(--lf-font-sans) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  transition: background .15s ease !important;
}

.lfmsg-top .lfbtn-ghost:hover {
  background: var(--lf-item-bg-hover) !important;
}

/* ══════════════════════════════════════════
   MESSAGES LIST — "Open chat" BUTTON
══════════════════════════════════════════ */

 .lfmsg-ava-badge {
   position: absolute;
   bottom: 0px;
   right: -4px;
   line-height: 0;
   z-index: 2;
 }

 .lfavatar-fallback {
   border-radius: 50% !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   background: var(--lf-item-bg-hover) !important;
   flex: 0 0 44px !important;
   box-sizing: border-box !important;
 }

.lfmsg-ava .lfavatar-fallback {
   width: 100% !important;
   height: 100% !important;
   flex: none !important;
 }

 /* Override verified icon size inside badge */
 .lfmsg-ava-badge .lfverified-ico {
   width: 16px !important;
   height: 16px !important;
   min-width: 16px !important;
   display: inline-flex !important;
 }

 .lfmsg-ava-badge .lfverified-ico::after {
   width: 14px !important;
   height: 14px !important;
   background-size: 9px !important;
 }

.lfmsg-row {
  position: relative;
   display: flex;
   align-items: center;
   gap: 10px;
   padding-right: 120px !important;  
  transition: background .15s ease, border-color .15s ease;
}

.lfmsg-row:hover {
  background: var(--lf-item-bg) !important;
}

/* Hide plain "Open chat" text */
.lfmsg-row-sub {
  display: none !important;
}

/* Inject styled button via pseudo-element on the row */
.lfmsg-row::after {
  content: 'Open chat →';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;

  font-family: var(--lf-font-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .2px;
  color: rgba(255,255,255,.75);

  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.12);
  background: var(--lf-item-bg);

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    box-shadow .15s ease;

  pointer-events: none;
}

.lfmsg-row:hover::after {
  background: linear-gradient(135deg, rgba(36,96,230,.25), rgba(79,163,247,.20));
  border-color: rgba(74,144,255,.45);
  color: #fff;
  box-shadow: 0 0 12px rgba(74,144,255,.18);
}

/* =============================================
   VERIFIED ICON — REDESIGN PATCH
   Lisa app.css + chat-ui-improved.css JÄRELE
   ============================================= */

/* ── Base reset ── */
.lfverified-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── Hide original SVG inside ── */
.lfverified-ico svg {
  display: none;
}

/* ── New badge via pseudo-element ── */
.lfverified-ico::after {
  content: '✓';

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 17px;
  height: 17px;
  border-radius: 50%;

  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  color: #fff;

  background: linear-gradient(135deg, #1a6ef5, #38b6ff);
  box-shadow:
    0 0 0 2px rgba(56, 182, 255, 0.20),
    0 2px 8px rgba(26, 110, 245, 0.40);

  transition: transform .15s ease, box-shadow .15s ease;
}

/* Hover: slight pulse */
a:hover .lfverified-ico::after,
button:hover .lfverified-ico::after,
.lfmsg-row:hover .lfverified-ico::after,
.lfsearch-row:hover .lfverified-ico::after {
  transform: scale(1.15);
  box-shadow:
    0 0 0 3px rgba(56, 182, 255, 0.28),
    0 4px 14px rgba(26, 110, 245, 0.50);
}

/* =============================================
   SEARCH UI — REDESIGN PATCH
   Lisa kõige viimasena pärast teisi patch-faile
   ============================================= */
   
/* ══════════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════════ */

.lfsearch-bar {
  background: var(--lf-item-bg) !important;
  border: 1.5px solid rgba(255,255,255,.10) !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  gap: 10px !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

.lfsearch-bar:focus-within {
  border-color: rgba(74,144,255,.45) !important;
  background: var(--lf-item-bg) !important;
  box-shadow: 0 0 0 3px rgba(74,144,255,.10), 0 4px 20px rgba(0,0,0,.30) !important;
}

.lfsearch-input {
  font-family: var(--lf-font-sans) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: rgba(255,255,255,.92) !important;
}

.lfsearch-input::placeholder {
  color: rgba(255,255,255,.28) !important;
  font-style: italic;
}

.lfsearch-ico {
  color: rgba(255,255,255,.40) !important;
}

.lfsearch-bar:focus-within .lfsearch-ico {
  color: rgba(74,144,255,.80) !important;
}

/* ══════════════════════════════════════════
   META ROW ("Results for …")
══════════════════════════════════════════ */

.lfsearch-meta {
  font-family: var(--lf-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.38);
  letter-spacing: .1px;
  margin-bottom: 10px;
}

.lfsearch-q {
  color: rgba(255,255,255,.75);
  font-weight: 700;
}

/* ══════════════════════════════════════════
   CARD + SECTION TITLE
══════════════════════════════════════════ */

.lfsearch-results .lfcard {
  border: 1px solid var(--lf-line-subtle) !important;
  border-radius: 18px !important;
  padding: 6px !important;
  overflow: hidden;
}

.lfsearch-results .lfcard-title {
  font-family: var(--lf-font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.30);
  padding: 10px 12px 6px;
  margin-bottom: 0;
}

/* ══════════════════════════════════════════
   SEARCH ROWS
══════════════════════════════════════════ */

.lfsearch-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lfsearch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  text-decoration: none;
  color: inherit;
  transition: background .14s ease, border-color .14s ease !important;
  position: relative;
}

.lfsearch-row:hover {
  background: var(--lf-item-bg) !important;
  border-color: rgba(255,255,255,.07) !important;
}

/* ── Avatar ── */
.lfsearch-ava {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,.10) !important;
  background: var(--lf-item-bg) !important;
  overflow: hidden;
  flex: 0 0 46px;
  position: relative;
}

.lfsearch-avaImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Name + handle ── */
.lfsearch-main {
  flex: 1;
  min-width: 0;
}

.lfsearch-title {
  font-family: var(--lf-font-sans) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: rgba(255,255,255,.92) !important;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  /* fix: avoid clipping verified icon when line height is tight */
  line-height: 1.2;  
}

.lfsearch-sub {
  font-family: var(--lf-font-sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: rgba(255,255,255,.38) !important;
  margin-top: 2px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Creator / User badge ── */
.lfsearch-title .lfbadge {
  font-family: var(--lf-font-sans);
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  letter-spacing: .2px;
}

/* Creator = blue tint */
.lfsearch-title .lfbadge:not(:empty) {
  background: rgba(36,96,230,.18) !important;
  border: 1px solid rgba(74,144,255,.28) !important;
  color: rgba(160,210,255,.90) !important;
}

/* "User" badge = neutral */
.lfsearch-title .lfbadge[style*="User"],
.lfsearch-row[data-role="user"] .lfbadge {
  background: var(--lf-item-bg) !important;
  border: 1px solid var(--lf-line-strong) !important;
  color: rgba(255,255,255,.55) !important;
}

/* ── Chevron arrow ── */
.lfsearch-go {
  color: rgba(255,255,255,.18) !important;
  transition: color .14s ease, transform .14s ease;
  flex: 0 0 auto;
}

.lfsearch-row:hover .lfsearch-go {
  color: rgba(74,144,255,.70) !important;
  transform: translateX(2px);
}

/* ══════════════════════════════════════════
   POST THUMBNAIL ROWS (hashtag results)
══════════════════════════════════════════ */

.lfsearch-thumb {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
  object-fit: cover;
}

/* ══════════════════════════════════════════
   EMPTY / NO RESULTS STATE
══════════════════════════════════════════ */

.lfsearch-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 20px !important;
  text-align: center;
}

.lfsearch-empty-ico {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--lf-item-bg);
  border: 1px solid var(--lf-line);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.30);
  margin-bottom: 4px;
}

.lfsearch-empty-title {
  font-family: var(--lf-font-sans);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
}

.lfsearch-empty-sub {
  font-family: var(--lf-font-sans);
  font-size: 13px;
  color: rgba(255,255,255,.32);
  font-weight: 500;
}

/* ══════════════════════════════════════════
   LOADING STATE
══════════════════════════════════════════ */

.lfsearch-empty .lfspin svg {
  color: rgba(74,144,255,.70);
}

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */

@media (max-width: 520px) {
  .lfsearch-row {
    padding: 10px 10px !important;
    gap: 10px !important;
  }

  .lfsearch-ava {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
  }

  .lfsearch-title {
    font-size: 14px !important;
  }

  .lfsearch-sub {
    font-size: 12px !important;
  }
}

/* =============================================
   SEARCH + MESSAGES — VERIFIED ICON PATCH v2
   Asendab ringi+linnukese ilusamaga
   ============================================= */

/* ── Peida originaal SVG ── */
.lfsearch-verifiedIcon > svg {
  display: none !important;
}

/* ── Base wrapper ── */
.lfsearch-verifiedIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  /* stable vertical nudge without affecting layout/height */
  transform: translateY(-1px);
  flex: 0 0 18px;
}

/* ── Badge via ::after ── */
.lfsearch-verifiedIcon::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;

  background-color: #1d6ef5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-repeat: no-repeat;
  background-position: center;

  box-shadow:
    0 0 0 2px rgba(29,110,245,.22),
    0 2px 8px rgba(29,110,245,.40);

  transition:
    transform .15s ease,
    box-shadow .15s ease;
}

/* ── Hover effect ── */
.lfsearch-row:hover .lfsearch-verifiedIcon::after {
  transform: scale(1.18);
  box-shadow:
    0 0 0 3px rgba(29,110,245,.30),
    0 3px 12px rgba(29,110,245,.55);
}

.lffeed-cmeta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lffeed-cname {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  text-align: left !important;
}

.lffeed-chandle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: rgba(255,255,255,.50);
  margin-top: 1px;
}

/* =============================================
   CREATOR APPLY PAGE — MOBILE RESPONSIVE PATCH
   lfvfy-* classes
   ============================================= */

/* ══════════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════════ */

.lfvfy {
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ══════════════════════════════════════════
   HEADER: Title + Back button
══════════════════════════════════════════ */

.lfvfy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lfvfy-title {
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.5px;
  margin: 0 0 6px;
}

.lfvfy-sub {
  margin: 0;
  opacity: .65;
  font-size: 14px;
}

/* Back button */
#lfBackToVerify.lfvfy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: var(--lf-item-bg);
  color: rgba(255,255,255,.85);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}

#lfBackToVerify.lfvfy-btn:hover {
  background: var(--lf-item-bg-hover);
  border-color: rgba(255,255,255,.22);
}

/* ══════════════════════════════════════════
   CARD
══════════════════════════════════════════ */

.lfvfy-card {
  background: var(--lf-card-bg);
  border: 1px solid var(--lf-line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
}

/* Section headings inside card */
.lfvfy-card > [style*="font-weight:800"],
.lfvfy-card > div[style*="font-weight:800"] {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: rgba(255,255,255,.92);
}

.lfvfy-note {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin-top: 4px;
  line-height: 1.5;
}

.lfvfy-divider {
  height: 1px;
  background: var(--lf-item-bg);
  margin: 16px 0;
}

/* ══════════════════════════════════════════
   BILLING INPUTS — 3 col → 1 col on mobile
══════════════════════════════════════════ */

.lfvfy-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .lfvfy-grid2 {
    grid-template-columns: 1fr !important;
  }
}

.lfvfy-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lfvfy-field span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.lfvfy-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--lf-line);
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.92);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  box-sizing: border-box;
}

.lfvfy-input::placeholder {
  color: rgba(255,255,255,.22);
}

.lfvfy-input:focus {
  border-color: rgba(74,144,255,.50);
  box-shadow: 0 0 0 3px rgba(74,144,255,.12);
}

/* ══════════════════════════════════════════
   ID UPLOAD — 2 col → 1 col on mobile
══════════════════════════════════════════ */

.lfvfy-uploadGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .lfvfy-uploadGrid {
    grid-template-columns: 1fr;
  }
}

.lfvfy-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
}

.lfvfy-upload b {
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}

/* ══════════════════════════════════════════
   CHECKBOX
══════════════════════════════════════════ */

.lfvfy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,.70);
  cursor: pointer;
  line-height: 1.5;
}

.lfvfy-check input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #2460e6;
  cursor: pointer;
}

.lfvfy-check a {
  color: #4fa3f7;
  text-decoration: none;
  font-weight: 600;
}

.lfvfy-check a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════
   ACTIONS — button + note
══════════════════════════════════════════ */

.lfvfy-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.lfvfy-btn--primary.lfvfy-btn--xl {
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.1px;
  color: #fff;
  background: linear-gradient(135deg, #1d57d4, #4fa3f7);
  box-shadow: 0 4px 20px rgba(36,96,230,.40);
  cursor: pointer;
  transition: filter .15s ease, transform .12s ease, box-shadow .15s ease;
}

.lfvfy-btn--primary.lfvfy-btn--xl:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(36,96,230,.50);
}

.lfvfy-btn--primary.lfvfy-btn--xl:active {
  transform: scale(.97);
}

.lfvfy-actions .lfvfy-note {
  text-align: center;
}

/* ══════════════════════════════════════════
   FORM GAP OVERRIDE
══════════════════════════════════════════ */

.lfvfy-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* =============================================
   WALLET PAGE — RESPONSIVE DESIGN PATCH
   ============================================= */

/* ══════════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════════ */

.lfw-top {
  margin-bottom: 20px;
}

.lfw-top .lfh1 {
  font-size: clamp(20px, 5vw, 20x);
  font-weight: 900;
  margin: 0 0 4px;
}

/* ══════════════════════════════════════════
   BALANCE CARDS — 2 col → 1 col mobile
══════════════════════════════════════════ */

.lfw-bal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .lfw-bal {
    grid-template-columns: 1fr;
  }
}

.lfw-balcard {
  padding: 16px !important;
  border-radius: 18px !important;
  border: 1px solid var(--lf-line) !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lfw-balhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.lfw-baltitle {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.50);
  letter-spacing: .3px;
  text-transform: uppercase;
}

.lfw-balvalue {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: -.5px;
  color: rgba(255,255,255,.95);
  margin: 4px 0;
}

.lfw-balmeta {
  font-size: 12.5px;
  color: rgba(255,255,255,.38);
  font-weight: 500;
}

.lfw-balmeta b {
  color: rgba(255,255,255,.65);
}

/* ── Buttons inside balance cards ── */
.lfw-actions {
  margin-top: auto !important;
  padding-top: 12px;
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap;
}

.lfw-actions .lfbtn {
  flex: 1 1 auto;
  justify-content: center;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  min-width: 0;
  white-space: nowrap;
}

/* Disabled state */
.lfw-actions .lfbtn:disabled {
  opacity: .35;
  cursor: not-allowed;
  filter: none;
}

/* Badge in header */
.lfw-balhead .lfbadge {
  font-size: 11px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   TABS — wrap on mobile
══════════════════════════════════════════ */

.lfw-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.lfw-tab {
  flex: 1 1 auto;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  text-align: center;
  min-width: 0;
  cursor: pointer;
}

@media (max-width: 480px) {
  .lfw-tab {
    flex: 1 1 calc(50% - 4px);
    font-size: 12px !important;
    padding: 9px 10px !important;
  }
}

/* ══════════════════════════════════════════
   TRANSACTION LIST ROWS
══════════════════════════════════════════ */

.lfw-list {
  display: grid;
  gap: 8px;
}

.lfw-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: var(--lf-item-bg) !important;
  border: 1px solid var(--lf-line-subtle) !important;
}

.lfw-row:hover {
  background: var(--lf-item-bg) !important;
}

.lfw-row-left {
  min-width: 0;
  flex: 1 1 auto;
}

.lfw-row-right {
  flex: 0 0 auto;
  text-align: right;
}

.lfw-row-top {
  display: flex;
  align-items: left;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.lfw-row-title {
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,.88);
}

.lfw-row-sub {
  font-size: 12px;
  color: rgba(255,255,255,.38);
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.lfw-row-amt {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.2px;
}

.lfw-row-amt.is-plus { color: #22c55e; }
.lfw-row-amt.is-minus { color: #ef4444; }

.lfw-row-date {
  font-size: 11.5px;
  color: rgba(255,255,255,.30);
  font-weight: 500;
  margin-top: 4px;
}

.lfw-badge {
  font-size: 11px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */

.lfw-empty {
  border-radius: 18px !important;
  padding: 32px 20px !important;
  text-align: center;
  background: var(--lf-card-bg) !important;
  border: 1px solid var(--lf-line-subtle) !important;
}

.lfw-empty-ico {
  font-size: 28px;
  margin-bottom: 6px;
  opacity: .5;
}

.lfw-empty-title {
  font-weight: 800;
  font-size: 16px;
  color: rgba(255,255,255,.70);
  margin-bottom: 6px;
}

.lfw-empty-sub {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  font-weight: 500;
}

/* ══════════════════════════════════════════
   CARD WRAPPER FOR PANELS
══════════════════════════════════════════ */

.lfw-panel .lfcard {
  border-radius: 18px !important;
  border: 1px solid var(--lf-line-subtle) !important;
  padding: 14px !important;
}

.lfw-panel .lfcard-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════
   MOBILE GLOBAL SAFETY
══════════════════════════════════════════ */

@media (max-width: 480px) {
  .lfw-row {
    padding: 10px 12px !important;
  }

  .lfw-balvalue {
    font-size: 26px;
  }

  .lfw-actions {
    flex-direction: column;
  }

  .lfw-actions .lfbtn {
    width: 100%;
    flex: none;
  }
}

/* ══ ACTION BUTTONS ══ */
.lfcreator-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  max-width: 520px;
}

/* Subscribe spans full width */
.lfcreator-actions #lfSubBtn {
  grid-column: 1 / -1;
}

.lfcreator-actions .lfbtn {
  padding: 10px 12px !important;
  font-size: 13px !important;
  border-radius: 12px !important;
}

/* ══ MOBILE ══ */
@media (max-width: 640px) {
  .lfcreator-top {
    grid-template-columns: 64px 1fr !important;
    grid-template-rows: auto auto;
  }

  .lfcreator-stats {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .lfcreator-actions {
    max-width: 100%;
  }
}

/* =============================================
   EDIT PROFILE PAGE — RESPONSIVE PATCH
   lfep-* / lfsetx-* classes
   ============================================= */

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */

.lfsetx-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lfsetx-top .lfh1 {
  font-size: clamp(22px, 5vw, 32px);
  margin: 0 0 4px;
}

.lfsetx-top .lfbtn-ghost {
  flex: 0 0 auto;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  font-size: 13.5px !important;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   CARD WRAPPER
══════════════════════════════════════════ */

.lfsetx-card {
  border-radius: 20px !important;
  padding: 20px !important;
  border: 1px solid var(--lf-line) !important;
}

/* ══════════════════════════════════════════
   AVATAR HEADER ROW
══════════════════════════════════════════ */

.lfep-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lfep-ava {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  flex: 0 0 72px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.12) !important;
  background: var(--lf-item-bg) !important;
}

.lfep-ava-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lfep-ava-title {
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,.85);
}

.lfep-file {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  cursor: pointer;
}

.lfep-file::file-selector-button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--lf-line-strong);
  background: var(--lf-item-bg);
  color: rgba(255,255,255,.80);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 8px;
  transition: background .14s ease;
}

.lfep-file::file-selector-button:hover {
  background: rgba(255,255,255,.12);
}

/* ══════════════════════════════════════════
   FORM GRID — 2 col desktop → 1 col mobile
══════════════════════════════════════════ */

.lfep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .lfep-grid {
    grid-template-columns: 1fr;
  }

  /* span2 has no effect on 1-col but keep it safe */
  .lfep-span2 {
    grid-column: 1 !important;
  }
}

.lfep-span2 {
  grid-column: 1 / -1;
}

/* ══════════════════════════════════════════
   FIELD + LABEL + INPUT
══════════════════════════════════════════ */

.lfep-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lfep-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.50);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.lfep-input {
  width: 100%;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--lf-line) !important;
  background: rgba(0,0,0,.26) !important;
  color: rgba(255,255,255,.90) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  outline: none;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.lfep-input::placeholder {
  color: rgba(255,255,255,.22) !important;
}

.lfep-input:focus {
  border-color: rgba(74,144,255,.50) !important;
  box-shadow: 0 0 0 3px rgba(74,144,255,.10) !important;
}

/* Disabled (email) */
.lfep-input:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Textarea */
.lfep-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5 !important;
}

/* ══════════════════════════════════════════
   RADIO GROUP
══════════════════════════════════════════ */

.lfep-radio {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--lf-line) !important;
  background: rgba(0,0,0,.22) !important;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.80);
}

.lfep-radio label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.lfep-radio input[type="radio"] {
  accent-color: #2460e6;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ══════════════════════════════════════════
   ACTIONS ROW
══════════════════════════════════════════ */

.lfep-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.lfep-msg {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  font-size: 13.5px;
  font-weight: 700;
  word-break: break-word;
}

/* Save button */
.lfep-actions > .lfbtn {
  padding: 11px 28px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: .2px;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .lfep-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lfep-actions > .lfbtn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .lfep-msg {
    width: 100%;
  }
}

/* =============================================
   MY PROFILE PAGE — RESPONSIVE PATCH
   lfp-* classes
   ============================================= */

/* ══════════════════════════════════════════
   CARD
══════════════════════════════════════════ */

.lfp-card {
  border-radius: 20px !important;
  padding: 20px !important;
  border: 1px solid var(--lf-line) !important;
}

/* ══════════════════════════════════════════
   HEAD ROW: avatar | info | stats
══════════════════════════════════════════ */

.lfp-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 420px) 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .lfp-head {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
  }

  .lfp-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

/* ── Avatar ── */
.lfp-ava {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,.12) !important;
  background: var(--lf-item-bg) !important;
  overflow: hidden;
  flex: 0 0 72px;
}

@media (max-width: 640px) {
  .lfp-ava {
    width: 60px !important;
    height: 60px !important;
    flex: 0 0 60px;
  }
}

/* ── Info column ── */
.lfp-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.lfp-name {
  font-size: clamp(18px, 4vw, 22px) !important;
  font-weight: 900 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.1;
}

.lfp-username {
  font-size: 12px;
  color: rgba(255,255,255,.50);
  font-weight: 600;
  margin-top: 0;
}

.lfp-title {
  font-size: 13px;
  color: rgba(255,255,255,.72);
  font-weight: 650;
  line-height: 1.35;
  margin-top: 2px;
  max-width: 360px;
}

/* Social icons row */
.lfp-social {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ── Action buttons ── */
.lfp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
}

.lfp-actions .lfbtn {
  padding: 8px 16px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  min-height: 38px;
}

/* ── Stats column ── */
.lfp-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
  justify-self: end;
}

.lfp-stat {
  border: 1px solid var(--lf-line) !important;
  background: var(--lf-item-bg) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  text-align: center;
  min-width: 72px;
}

.lfp-stat-v {
  font-size: 18px;
  font-weight: 900;
  color: rgba(255,255,255,.92);
}

.lfp-stat-k {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.38);
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   BODY SECTIONS
══════════════════════════════════════════ */

.lfp-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Each section card */
.lfp-section > .lfcard,
.lfp-section .lfcard {
  border-radius: 16px !important;
  border: 1px solid var(--lf-line-subtle) !important;
  padding: 14px 16px !important;
}

.lfp-section-title,
.lfp-section .lfcard-title {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: rgba(255,255,255,.30) !important;
  margin-bottom: 10px !important;
}

/* Creator section tabs */
.lfp-section .lftabs,
.lfp-section [class*="tabs"] {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lfp-section .lftab {
  padding: 9px 16px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* Subscription row */
.lfp-section .lfw-row,
.lfp-section [class*="sub-row"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   MOBILE GLOBAL
══════════════════════════════════════════ */

@media (max-width: 480px) {
  .lfp-card {
    padding: 14px !important;
  }

  .lfp-actions {
    flex-direction: row;
  }

  .lfp-actions .lfbtn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  /* Kogu head tsentreeritud */
  .lfp-head {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
  }

  /* Section tabid/nupud keskele */
  .lfp-section .lftabs,
  .lfp-section .lfp-section-tabs {
    justify-content: center !important;
  }

  .lfp-section .lftab,
  .lfp-section .lfbtn {
    text-align: center;
  }

  /* Avatar keskele */
  .lfp-ava {
    justify-self: center !important;
  }

  /* Info tekst keskele */
  .lfp-info {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  /* Nimi + badge keskel */
  .lfp-name {
    justify-content: center !important;
  }

  /* Social ikoonid keskel */
  .lfp-social {
    justify-content: center !important;
  }

  /* Nupud keskel, täislaius */
  .lfp-actions {
    justify-content: center !important;
    width: 100%;
  }

  .lfp-actions .lfbtn {
    flex: 1 1 auto;
    max-width: 160px;
  }

  /* Stats rida: 1 veerg (ainult Posts näha) */
  .lfp-stats {
    grid-column: 1 !important;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)) !important;
    width: 100%;
  }
}

.lfp-stat-k {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.38);
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   MY PROFILE — VERIFY CTA
══════════════════════════════════════════ */

.lf-verify-cta {
  padding: 24px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(700px 260px at 50% -10%, rgba(59,130,246,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    #11161d !important;
  border: 1px solid var(--lf-line) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}

.lf-verify-cta__problem {
  text-align: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.72);
  letter-spacing: .01em;
}

.lf-verify-cta__title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 950;
  color: #3b82f6;
  margin-bottom: 10px;
}

.lf-verify-cta__subtitle {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 10px;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255,255,255,.92);
}

.lf-verify-cta__trust {
  text-align: center;
  margin: 0 auto 20px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,.78);
}

.lf-verify-cta__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 0 auto 18px;
}

.lf-verify-cta__item {
  padding: 16px 18px !important;
  text-align: left;
  border-radius: 20px !important;
  background: rgba(255,255,255,.035) !important;
  border: 1px solid var(--lf-line-subtle) !important;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.lf-verify-cta__item:hover {
  transform: translateY(-2px);
  border-color: rgba(59,130,246,.26) !important;
  background: var(--lf-item-bg) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.lf-verify-cta__item-title {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 900;
  color: #fff;
}

.lf-verify-cta__item-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.58;
  color: rgba(255,255,255,.78);
}

.lf-verify-cta__activate {
  text-align: center;
  margin: 2px 0 18px;
  font-size: 14px;
  color: rgba(255,255,255,.82);
}

.lf-verify-cta__button {
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px;
  min-height: 56px;
  border-radius: 999px !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 28px rgba(59,130,246,.24);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;  
}

.lf-verify-cta__urgency {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  color: #93c5fd;
}

.lf-verify-cta__footnote {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.58);
}

.lf-verify-cta__button {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.lf-verify-cta__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(59,130,246,.35);
  filter: brightness(1.05);
}

.lf-verify-cta__item:hover {
  border-color: rgba(59,130,246,.35) !important;
}

@media (max-width: 900px) {
  .lf-verify-cta {
    padding: 20px !important;
    border-radius: 20px !important;
  }

  .lf-verify-cta__subtitle {
    font-size: 16px;
  }

  .lf-verify-cta__grid {
    grid-template-columns: 1fr;
    max-width: 860px;
  }
}

@media (max-width: 640px) {
  .lf-verify-cta {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .lf-verify-cta__problem,
  .lf-verify-cta__trust,
  .lf-verify-cta__urgency,
  .lf-verify-cta__footnote {
    font-size: 12px;
  }

  .lf-verify-cta__subtitle {
    font-size: 15px;
    line-height: 1.55;
  }

  .lf-verify-cta__item {
    padding: 14px 14px !important;
    border-radius: 16px !important;
  }

  .lf-verify-cta__item-title {
    font-size: 16px;
  }

  .lf-verify-cta__item-text,
  .lf-verify-cta__activate {
    font-size: 13px;
  }

  .lf-verify-cta__button {
    min-height: 52px;
    font-size: 16px !important;
    max-width: 100%; 
  }
}

/* =============================================
   NEW POST PAGE — RESPONSIVE DESIGN PATCH
   lfnp-* classes
   ============================================= */

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */

.lfnp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.lfnp-head {
  text-align: left !important;
  display: flex;
  flex-direction: column;
  gap: 4px;  
  margin-bottom: 20px;
  align-items: flex-start;
}

.lfnp-head .lfh1 {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.lfnp-head .lfmuted {
  font-size: 13.5px;
}

/* ══════════════════════════════════════════
   CARD
══════════════════════════════════════════ */

.lfnp-card {
  background: var(--lf-card-bg);
  border: 1px solid var(--lf-line) !important;
  border-radius: 20px !important;
  padding: 6px !important;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   ROWS — label left, value right → stack on mobile
══════════════════════════════════════════ */

.lfnp-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px 16px;
  align-items: start;
  padding: 14px 16px !important;
  border-radius: 14px;
  border: 1px solid transparent !important;
  background: transparent !important;
  margin: 0 !important;
  transition: background .14s ease;
}

.lfnp-row + .lfnp-row {
  border-top: 1px solid rgba(255,255,255,.05) !important;
  border-radius: 0;
}

.lfnp-row:last-of-type {
  border-radius: 0 0 14px 14px;
}

.lfnp-row:first-of-type {
  border-radius: 14px 14px 0 0;
}

@media (max-width: 520px) {
  .lfnp-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ── Label ── */
.lfnp-label {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: rgba(255,255,255,.45) !important;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding-top: 3px;
}

/* ── Value ── */
.lfnp-value {
  min-width: 0;
}

/* Creator name */
.lfnp-value b {
  font-weight: 700;
  color: rgba(255,255,255,.88);
}

.lfnp-value > span,
.lfnp-value > b + * {
  color: rgba(255,255,255,.45);
  font-size: 13px;
}

/* ══════════════════════════════════════════
   UPLOAD AREA
══════════════════════════════════════════ */

.lfupload {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 13px 14px !important;
  border-radius: 14px !important;
  border: 1.5px dashed rgba(255,255,255,.14) !important;
  background: var(--lf-item-bg) !important;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease !important;
  width: 100%;
  box-sizing: border-box;
}

.lfupload:hover {
  border-color: rgba(74,144,255,.40) !important;
  background: rgba(74,144,255,.06) !important;
}

.lfupload-ico {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid var(--lf-line-strong) !important;
  background: var(--lf-item-bg) !important;
  flex: 0 0 40px;
}

.lfupload-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: rgba(255,255,255,.88);
}

.lfupload-sub {
  font-size: 12px !important;
  color: rgba(255,255,255,.38) !important;
  margin-top: 2px !important;
}

/* ══════════════════════════════════════════
   INPUTS
══════════════════════════════════════════ */

.lfnp-value .lfinput {
  width: 100% !important;
  max-width: 100% !important;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--lf-line) !important;
  background: rgba(0,0,0,.26) !important;
  color: rgba(255,255,255,.90) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.lfnp-value .lfinput:focus {
  border-color: rgba(74,144,255,.50) !important;
  box-shadow: 0 0 0 3px rgba(74,144,255,.10) !important;
  outline: none;
}

.lfnp-value .lfinput::placeholder {
  color: rgba(255,255,255,.22) !important;
}

/* Select arrow custom */
.lfnp-value select.lfinput {
  cursor: pointer;
}

/* Textarea */
.lfnp-value textarea.lfinput {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5 !important;
}

/* ══════════════════════════════════════════
   TOGGLE BUTTON
══════════════════════════════════════════ */

.lfnp-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(255,255,255,.12) !important;
  background: var(--lf-item-bg) !important;
  color: rgba(255,255,255,.65) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease !important;
}

.lfnp-toggle.is-on {
  border-color: rgba(59,130,246,.45) !important;
  background: rgba(59,130,246,.12) !important;
  color: rgba(191,219,254,.95) !important;
}

.lfnp-toggle-dot {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.25) !important;
  transition: background .15s ease !important;
}

.lfnp-toggle.is-on .lfnp-toggle-dot {
  background: #3b82f6 !important;
}

/* ══════════════════════════════════════════
   PPV ROW — toggle + input inline
══════════════════════════════════════════ */

.lfnp-value[style*="display:flex"] {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.lfnp-value[style*="display:flex"] .lfinput {
  max-width: 200px !important;
  flex: 1 1 160px;
}

@media (max-width: 520px) {
  .lfnp-value[style*="display:flex"] .lfinput {
    max-width: 100% !important;
    flex: 1 1 100%;
  }
}

/* ══════════════════════════════════════════
   MUTED HELP TEXT
══════════════════════════════════════════ */

.lfnp-value .lfmuted {
  font-size: 12px !important;
  color: rgba(255,255,255,.32) !important;
  margin-top: 6px !important;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   SUBMIT ROW
══════════════════════════════════════════ */

.lfnp-card > div[style*="margin-top:14px"] {
  padding: 16px !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.06);
}

.lfnp-card > div[style*="margin-top:14px"] .lfbtn {
  border-radius: 999px !important;
  padding: 11px 24px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

@media (max-width: 480px) {
  .lfnp-card > div[style*="margin-top:14px"] {
    flex-direction: column;
  }

  .lfnp-card > div[style*="margin-top:14px"] .lfbtn {
    width: 100%;
    justify-content: center;
  }
}

 .lfnoti-ava-inner .lfavatar-fallback {
   display: none !important;
 }

 @media (max-width: 640px) {
  .lfcreator-meta {
    text-align: left !important;
    align-items: flex-start !important;
  }

  .lfcreator-name {
    justify-content: flex-start !important;
  }

  .lfcreator-actions {
    justify-content: flex-start !important;
  }
}

/* =============================================
   EDIT PACKAGE PAGE — RESPONSIVE PATCH
   pkg-* classes
   ============================================= */

.pkg-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.pkg-wrap h1 {
  padding-top: 20px;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  margin: 0 0 20px;
}

/* ── Card ── */
.pkg-card {
  background: var(--lf-card-bg) !important;
  border: 1px solid var(--lf-line);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Fields ── */
.pkg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pkg-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.pkg-card input,
.pkg-card select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--lf-line);
  background: rgba(0,0,0,.26);
  color: rgba(255,255,255,.90);
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.pkg-card input::placeholder {
  color: rgba(255,255,255,.22);
}

.pkg-card input:focus,
.pkg-card select:focus {
  border-color: rgba(74,144,255,.50);
  box-shadow: 0 0 0 3px rgba(74,144,255,.10);
}

.pkg-card select {
  cursor: pointer;
}

/* ── Actions ── */
.pkg-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 4px;
}

.pkg-actions .btn-secondary {
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: var(--lf-item-bg);
  color: rgba(255,255,255,.80);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s ease;
}

.pkg-actions .btn-secondary:hover {
  background: var(--lf-item-bg-hover);
}

.pkg-actions .btn-primary {
  padding: 11px 24px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1d57d4, #4fa3f7);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(36,96,230,.35);
  transition: filter .14s ease, transform .12s ease;
}

.pkg-actions .btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ── Error ── */
.pkg-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.20);
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .pkg-actions {
    flex-direction: column;
  }

  .pkg-actions .btn-secondary,
  .pkg-actions .btn-primary {
    width: 100%;
    text-align: center;
  }
}

/* critical: allow flex children to shrink so text can wrap */
.lfp-info,
.lfp-name {
  min-width: 0;
}

.lfp-name,
.lfp-username,
.lfp-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* feed creator row: allow long text to shrink */
.lffeed-meta,
.lffeed-cname,
.lffeed-handle {
  min-width: 0;
}

.lffeed-cname,
.lffeed-handle {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lffeed-cname,
.lffeed-handle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* FEED: allow creator meta to wrap to new lines on mobile/long names */
.lffeed-creator,
.lffeed-meta {
  min-width: 0;          /* KEY: allow flex children to shrink/wrap */
}

.lffeed-meta {
  display: flex;
  flex-direction: column; /* name on 1 line, handle on next */
  gap: 2px;
  align-items: flex-start;
}

/* Wrap long unbroken strings (aaaaaaaa...) */
.lffeed-cname,
.lffeed-handle {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* SEARCH rows: allow text area to shrink and wrap */
.lfsearch-row,
.lfsearch-main {
  min-width: 0; /* KEY: allow wrapping inside flex/grid */
}

/* Title line: allow wrap for long unbroken strings */
.lfsearch-title {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Subtitle line: wrap + clamp (optional) */
.lfsearch-sub {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* OPTIONAL: keep subtitle from becoming huge blocks */
@supports (-webkit-line-clamp: 2) {
  .lfsearch-sub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* CREATOR / PROFILE header: allow name block to shrink and wrap */
.lfcreator-top,
.lfcreator-meta,
.lfcreator-name {
  min-width: 0; /* KEY for flex/grid children */
}

/* Name row: allow wrapping (including long unbroken strings) */
.lfcreator-name {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Ensure badge doesn't get pushed off-screen and stays aligned */
.lfcreator-name .lfbadge,
.lfcreator-name .lfverified-ico {
  flex: 0 0 auto;
}

/* Handle line should also wrap safely */
.lfcreator-handle {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =========================
   MESSAGES LIST: long names
   ========================= */

/* allow flex/grid children to shrink */
.lfmsg-row,
.lfmsg-main,
.lfmsg-title,
.lfmsg-handle,
.lfmsg-row-sub {
  min-width: 0;
}

/* name/title should wrap even for unbroken strings */
.lfmsg-title {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* handle also safe-wrap */
.lfmsg-handle {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* optional: keep verified badge from shrinking */
.lfmsg-ava-badge,
.lfverified-ico,
.lfbadge {
  flex: 0 0 auto;
}

.lffeed-title{
  font-weight: 950;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;

  white-space: normal;
  text-overflow: clip;

  overflow-wrap: anywhere;
  word-break: break-word;
}

.lfreels-avaImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lfreels-uinfo{
  flex: 1;
  min-width: 0; /* VÄGA OLULINE overflow fix */
}

.lfreels-uname{
  font-weight: 600;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* =========================================
   NAV RAIL: prevent first-paint flash
   - Disable rail/overlay transitions until JS marks nav ready
   ========================================= */
html:not(.lf-nav-ready) .lfrail,
html:not(.lf-nav-ready) .lfrail-overlay{
  transition: none !important;
  animation: none !important;
}

/* =========================================================
   CMS Policy Pages (Refund/Privacy/Terms/About)
   Wrapper injected by FE: <div class="lfpage-html">...</div>
   Mobile-first, safe defaults.
========================================================= */

.lfpage-html {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  font-size: 15px;         /* mobile default */
  line-height: 1.75;
  word-break: break-word;  /* prevent long tokens blowing layout */
  overflow-wrap: anywhere;
}

/* Headings */
.lfpage-html h1 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.lfpage-html h2 {
  margin: 18px 0 10px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 850;
}

.lfpage-html h3 {
  margin: 14px 0 8px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 850;
}

/* Paragraphs */
.lfpage-html p {
  margin: 10px 0;
  opacity: 0.95;
}

/* Links */
.lfpage-html a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lfpage-html a:hover {
  opacity: 0.9;
}

/* Horizontal rule */
.lfpage-html hr {
  border: 0;
  height: 1px;
  margin: 16px 0;
  background: rgba(255,255,255,0.12);
}

/* Lists (bullets) */
.lfpage-html ul,
.lfpage-html ol {
  margin: 10px 0 14px;
  padding-left: 20px;
}

.lfpage-html li {
  margin: 8px 0;
}

/* Nested lists */
.lfpage-html li > ul,
.lfpage-html li > ol {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Blockquote */
.lfpage-html blockquote {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
}

/* Inline code + pre */
.lfpage-html code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

.lfpage-html pre {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
  background: rgba(255,255,255,0.06);
}

/* Tables: mobile-friendly (scroll) */
.lfpage-html table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  display: block;           /* enables horizontal scroll on small screens */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

.lfpage-html thead,
.lfpage-html tbody,
.lfpage-html tr {
  width: 100%;
}

.lfpage-html th,
.lfpage-html td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;      /* prevents squishing on mobile */
}

.lfpage-html thead th {
  font-weight: 850;
  background: rgba(255,255,255,0.06);
}

/* Desktop bumps */
@media (min-width: 640px) {
  .lfpage-html { font-size: 16px; }
  .lfpage-html h1 { font-size: 28px; }
  .lfpage-html h2 { font-size: 18px; }
  .lfpage-html h3 { font-size: 16px; }
  .lfpage-html ul,
  .lfpage-html ol { padding-left: 22px; }
  .lfpage-html hr { margin: 18px 0; }
}

/* =========================
   PPV LOCKED EFFECT
========================= */

.lfchat-imgwrap.lfchat-ppv-locked {
  position: relative;
  width: 260px;
  max-width: 100%;
  min-height: 200px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #11151d, #0c0f14);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04),
              0 10px 40px rgba(0,0,0,0.5);
}

/* Blurred fake preview */
.lfchat-ppv-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: radial-gradient(circle at 30% 20%, rgba(80,120,255,0.15), transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(140,80,255,0.15), transparent 60%);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.4);
  z-index: 1;
}

/* Unlock overlay */
.lfchat-ppv-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 2;
}

/* Sparkle animated button */
.lfppv-btn {
  position: relative;
  overflow: hidden;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(90deg, #4f7cff, #7d5cff);
  border: none;
  box-shadow: 0 0 20px rgba(100,120,255,0.5);
  transition: transform .15s ease, box-shadow .3s ease;
}

.lfppv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(120,140,255,0.7);
}

/* shimmer light sweep */
.lfppv-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.5),
    transparent
  );
  transform: skewX(-20deg);
  animation: lfppv-shimmer 2.5s infinite;
}

@keyframes lfppv-shimmer {
  0% { left: -75%; }
  100% { left: 130%; }
}

/* =========================
   PPV REVEAL EFFECT (after unlock)
========================= */

.lfchat-imgwrap.lfppv-reveal{
  position: relative;
  overflow: hidden;
}

.lfchat-imgwrap.lfppv-reveal::before{
  content:"";
  position:absolute;
  inset:0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0,0,0,.35);
  animation: lfppv-veil 900ms ease-out forwards;
  z-index: 8;
  pointer-events: none;
}

.lfchat-imgwrap.lfppv-reveal::after{
  content:"";
  position:absolute;
  inset:-30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 55%, rgba(255,255,255,.7) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 48%, rgba(255,255,255,.6) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(160,130,255,.40), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(.85);
  animation: lfppv-spark 900ms ease-out forwards;
  z-index: 9;
  pointer-events: none;
}

@keyframes lfppv-veil{
  0%{ opacity: 1; }
  100%{ opacity: 0; }
}

@keyframes lfppv-spark{
  0%{ opacity: 0; transform: scale(.85); }
  20%{ opacity: 1; transform: scale(1.02); }
  60%{ opacity: .55; transform: scale(1.12); }
  100%{ opacity: 0; transform: scale(1.18); }
}

/* tighten selector */
.lfchat-imgwrap.lfchat-ppv-locked { /* sama sisu mis .lfchat-ppv-locked */ }

/* click safety */
.lfchat-ppv-overlay { pointer-events: none; }
.lfchat-ppv-overlay .lfppv-btn { pointer-events: auto; }

/* ensure sparkle overlays above img */
.lfchat-imgwrap.lfppv-reveal img.lfchat-img { position: relative; z-index: 1; }

.lfchat-imgwrap.lfchat-ppv-own { position: relative; }

.lfchat-ppv-badge{
  position:absolute;
  top:10px;
  left:10px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.3px;
  background: rgba(0,0,0,.55);
  border: 1px solid var(--lf-line-strong);
  backdrop-filter: blur(10px);
}

.lfchat-imgwrap {
  min-height: 160px;
  overflow: hidden;
 }

/* UX: hide empty-looking bubbles while image is hydrating, without collapsing layout */
.lfchat-row.lfchat-row-loading .lfchat-bubble {
  visibility: hidden;   /* keeps layout, hides the "empty bubble" paint */
}

/* Optional: if you also want to hide the meta while loading (time/status) */
.lfchat-row.lfchat-row-loading + .lfchat-meta {
  visibility: hidden;
}

#lfChatPeerLink:hover { opacity: .92; }
#lfChatPeerLink:active { opacity: .86; }

/* Hide ESC hint on touch devices (mobile/tablet) */
@media (hover: none), (pointer: coarse) {
  .lf-esc-hint {
    display: none;
  }
}

.lf-legal-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.lf-legal-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------
   TRUST ICONS (shield / lock / privacy)
   ------------------------------------------ */

.lfvfy-note svg {
  color: var(--lf-trust-blue);
  opacity: .95;
}

/* Trust info row */
.lfvfy-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: .9;
}

/* ------------------------------------------
   INPUT FIELDS
   ------------------------------------------ */

.lfvfy-input {
  border: 1px solid var(--lf-line-strong);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.lfvfy-input:hover {
  border-color: var(--lf-trust-blue-soft);
}

.lfvfy-input:focus {
  border-color: var(--lf-trust-blue);
  box-shadow: 0 0 0 1px var(--lf-trust-blue-soft);
  outline: none;
}


/* ------------------------------------------
   DROPDOWN FIELD
   ------------------------------------------ */

select.lfvfy-input:hover {
  border-color: var(--lf-trust-blue-hover);
}

select.lfvfy-input:focus {
  border-color: var(--lf-trust-blue);
}


/* ------------------------------------------
   FILE UPLOAD BOX (ID upload)
   ------------------------------------------ */

.lfvfy-upload:hover {
  border-color: var(--lf-trust-blue-hover);
  background: var(--lf-trust-blue-bg);
  box-shadow: 0 0 0 1px rgba(96,165,250,.15);
}

/* ------------------------------------------
   CHECKBOX
   ------------------------------------------ */

#lfAgree {
  accent-color: var(--lf-trust-blue);
}


/* ------------------------------------------
   PRIMARY BUTTON
   ------------------------------------------ */

.lfvfy-btn--primary {
  background: linear-gradient(
    90deg,
    #2563eb,
    #3b82f6,
    #60a5fa
  );
  transition: transform .15s ease, box-shadow .15s ease;
}

.lfvfy-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59,130,246,.35);
}


/* ------------------------------------------
   TEXT EMPHASIS (trust messaging)
   ------------------------------------------ */

.lfvfy-note strong,
.lfvfy-note b {
  color: #cbd5f5;
}


/* ------------------------------------------
   DIVIDER
   ------------------------------------------ */

.lfvfy-divider {
  border-top: 1px solid rgba(255,255,255,.08);
}


/* ==========================================
   OPTIONAL COMMENT / NOTE BOX
   (future use: admin feedback, rejection reason,
   creator notes, etc.)
   ========================================== */

.lfvfy-comment-box {
  border: 1px solid var(--lf-line);
  background: rgba(255,255,255,.02);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,.82);
}

.lfvfy-comment-box strong {
  color: #7fb6ff;
}

.lfvfy-comment-box textarea {
  width: 100%;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--lf-line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  resize: vertical;
  min-height: 80px;
}

.lfvfy-comment-box textarea:focus {
  border-color: var(--lf-trust-blue);
  outline: none;
  box-shadow: 0 0 0 1px var(--lf-trust-blue-soft);
}

.lfvfy-btn--primary:disabled {
  opacity: .7;
  cursor: not-allowed;
  box-shadow: none;
}

/* =========================
   REVIEW TIME NOTE
   ========================= */

.lfvfy-review-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  text-align: center;
  opacity: .9;
}

/* =========================
   STEP INDICATOR
   ========================= */

.lfvfy-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  opacity: .85;
}

/* ==========================================
   CREATOR VERIFICATION / KYC UX BOOSTS
   ========================================== */

.lfvfy-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: rgba(255,255,255,.78);
}

.lfvfy-secure-badge svg {
  color: var(--lf-trust-blue);
}

.lfvfy-upload-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #93c5fd;
  font-size: 13px;
  margin-top: 6px;
}

.lfvfy-upload-status svg {
  color: #93c5fd;
}

.lfvfy-review-time svg {
  color: var(--lf-trust-blue);
}

.lfvfy-upload {
  border: 1px dashed var(--lf-trust-blue-soft);
  background: var(--lf-item-bg);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.lfvfy-upload.is-dragover {
  border-color: var(--lf-trust-blue);
  background: var(--lf-trust-blue-bg);
}

.lfvfy-step-badge {
  background: rgba(59,130,246,.15);
  color: #93c5fd;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
}

.lfvfy-upload-status.is-hidden {
  display: none;
}

.lfvfy-id-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  margin-bottom: 6px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.lfvfy-id-tips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lfvfy-id-tips svg {
  color: #7fb6ff;
  opacity: .9;
}

/* Verify page step preview */
.lfvfy-steps-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  margin-bottom: 12px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

.lfvfy-steps-preview span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lfvfy-steps-preview b {
  color: #93c5fd;
  font-weight: 700;
}

.lfvfy-value-line {
  color: rgba(255,255,255,.88);
  font-weight: 500;
}

/* Messages badge positioning */
#lfNavMessages .lfico,
#lfBotMessages .lfico { position: relative; display: inline-flex; }

/* Messages unread dot in thread list */
.lfmsg-unread-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Thread row highlight when unread */
.lfmsg-row--unread .lfmsg-title { color: #fff; }
.lfmsg-row--unread .lfmsg-handle { color: var(--lf-muted-light, #aaa); }
.lfmsg-row--unread { background: var(--lf-item-bg); }

/* Unread dot on avatar (Instagram style) */
.lfmsg-unread-ava-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff3b30;
  border: 2px solid var(--lf-bg, #111);
}

/* Views counter — sama stiil nagu lffeed-btn */
.lffeed-action {
  border: 1px solid var(--lf-line);
  background: var(--lf-item-bg);
  color: var(--lf-text);
  font-weight: 950;
  padding: 10px 12px;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.lf-cmt-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lf-muted);
  cursor: pointer;
  opacity: 0.6;
  transition: color 0.15s, opacity 0.15s, background 0.15s;
}
.lf-cmt-del-btn:hover {
  color: #ef4444;
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

.lfep-banner-section{
  margin-bottom: 20px;
}
.lfep-banner-preview{
  width: 100%;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--lf-card-bg);
  border: 1px solid var(--lf-line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  cursor: pointer;
}
.lfep-banner-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lfep-banner-empty{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lf-muted);
  font-size: 14px;
}
.lfep-banner-actions{
  display: flex;
  flex-direction: column;
  gap: 4px;
}