/* Word page (/yaasa/<word>), classes prefixed yw- ("yaasalu word"; not wp-, which ad blockers hide as WordPress widgets). Mobile first: one column with a sticky action bar;
   from 992px wide, the main column and a sidebar side by side. */

.yw {
  --yw-text: #1f2328;
  --yw-muted: #656d76;
  --yw-line: #e3e6ea;
  --yw-soft: #f6f8f7;
  --yw-green: #198754;
  --yw-green-soft: #e8f3ee;
  color: var(--yw-text);
  font-family: "Noto Sans Telugu", system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: 100%;
  margin: 0 auto 2rem;
  overflow-wrap: anywhere;
}
.yw a:not(.btn) { color: var(--yw-green); }
.yw-main { min-width: 0; }

.yw-crumb { font-size: 0.85rem; color: var(--yw-muted); margin: 1rem 0 0.75rem; }
.yw-crumb a { color: var(--yw-muted); text-decoration: none; }

/* The word */
.yw-head { margin-bottom: 1.25rem; }
.yw-word { font-size: 2.4rem; font-weight: 700; line-height: 1.25; margin: 0; }
.yw-sub { margin: 0.25rem 0 0; color: var(--yw-muted); font-size: 0.95rem; }
.yw-sub span + span::before { content: "·"; margin: 0 0.4em; }
.yw-english { margin: 0.6rem 0 0; font-size: 1.05rem; }
.yw-english span { color: var(--yw-muted); }

/* Each entry (a word can have several meanings, by design) */
.yw-entry { position: relative; padding: 1rem 0 0.75rem; border-top: 1px solid var(--yw-line); }
.yw-num {
  position: absolute; top: 1rem; right: 0;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--yw-green-soft); color: var(--yw-green);
  font: 600 0.9rem/1.75rem system-ui, sans-serif; text-align: center;
}
.yw-label { font-size: 0.8rem; font-weight: 600; color: var(--yw-muted); letter-spacing: 0.02em; margin: 0 0 0.15rem; }
.yw-label-inline { font-weight: 600; color: var(--yw-muted); }
.yw-meaning { font-size: 1.35rem; line-height: 1.6; margin: 0 2rem 0.35rem 0; white-space: pre-line; }
.yw-en { color: var(--yw-muted); font-size: 0.95rem; margin: 0 0 0.75rem; font-family: system-ui, sans-serif; }
.yw-example {
  margin: 0.25rem 0 0.75rem; padding: 0.5rem 0.9rem;
  border-left: 3px solid var(--yw-green); background: var(--yw-soft); border-radius: 0 6px 6px 0;
  font-size: 1.05rem; line-height: 1.7; white-space: pre-line;
}
.yw-ety { font-size: 0.95rem; margin: 0 0 0.75rem; }

.yw-chips, .yw-related { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }
.yw-chip {
  display: inline-block; padding: 0.2rem 0.7rem; border: 1px solid var(--yw-line); border-radius: 999px;
  font-size: 0.9rem; text-decoration: none; color: var(--yw-text) !important; background: #fff;
}
.yw-chip span { color: var(--yw-muted); font-size: 0.8rem; font-family: system-ui, sans-serif; }
.yw-chip-region { border-color: #b7dcc8; background: var(--yw-green-soft); }
.yw-chip:hover { border-color: var(--yw-green); }

.yw-gifs { display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 0.75rem; }
.yw-gifs img { height: 140px; width: auto; border-radius: 6px; }

.yw-entry-foot { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--yw-muted); }
.yw-like { display: inline-flex; align-items: center; gap: 0.35rem; }
.yw-like .bagundi-button { font-size: 1.15rem; cursor: pointer; }
.yw-like .bagundi-button.favorited { color: #0d6efd; }
.yw .fas[data-count]:after { content: none; }   /* the old red count badge; the number sits beside it */
.yw-icon-btn { border: 0; background: none; color: var(--yw-muted); padding: 0.25rem; font-size: 1rem; }
.yw-icon-btn:hover { color: var(--yw-green); }
.yw-by { margin-left: auto; }
.yw-by a { color: var(--yw-muted); }

/* Invite another meaning, share, browse */
.yw-add {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
  margin: 1rem 0; padding: 0.75rem 1rem; border: 1px dashed #b7dcc8; border-radius: 8px; background: var(--yw-green-soft);
}
.yw-share { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1rem; font-size: 1.25rem; }
.yw-share .btn { font-size: 0.9rem; }
.yw-share a { color: var(--yw-muted) !important; }
.yw-nextprev {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.75rem 0; border-top: 1px solid var(--yw-line); border-bottom: 1px solid var(--yw-line); font-size: 0.95rem;
}
.yw-nextprev a { text-decoration: none; }

.yw-comments { margin: 1rem 0; }
.yw-comments summary { cursor: pointer; color: var(--yw-green); font-weight: 600; padding: 0.5rem 0; }

/* Sidebar: below the content on phones */
.yw-box { padding: 1rem 0; border-top: 1px solid var(--yw-line); }
.yw-box-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.6rem; }
.yw-box p { font-size: 0.95rem; color: var(--yw-muted); margin-bottom: 0.6rem; }

/* Sticky action bar on phones and tablets */
.yw-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: flex; justify-content: space-around;
  padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--yw-line); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}
.yw-bar a, .yw-bar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px;
  border: 0; background: none; color: var(--yw-text) !important; text-decoration: none; font-size: 0.75rem;
}
.yw-bar i { font-size: 1.15rem; color: var(--yw-green); }
@media (max-width: 991.98px) {
  body { padding-bottom: 64px; }
  .fab-add { display: none !important; }   /* the bar has its own add button */
}

@media (min-width: 576px) {
  .yw-word { font-size: 2.75rem; }
}

/* Desktop: main column and sidebar */
@media (min-width: 992px) {
  .yw { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; max-width: 1040px; }
  .yw-side { padding-top: 2.2rem; }
  .yw-box { padding: 1rem 1.1rem; border: 1px solid var(--yw-line); border-radius: 10px; margin-bottom: 1rem; }
  .yw-bar { display: none; }
}
