/* Medicines and breastfeeding (/ejeler/derman/, /lukmanlar/derman/).
   Only what hub.css does not give; colours from its variables only, so dark
   mode needs no rules of its own. */

/* ------------------------------------------------------------- search --- */
.lm-h1 { font-size: 25px; line-height: 1.2; font-weight: 800; margin: 6px 0 10px; letter-spacing: -.01em; }
.lm-search { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px 14px 12px; margin: 4px 0 6px; }
.lm-lab { display: block; font-size: 14px; font-weight: 800; color: var(--ink-mid); margin: 0 0 8px; }
.lm-q { position: relative; }
.lm-q .inp { padding-left: 46px; padding-right: 52px; font-size: 18px; -webkit-appearance: none; appearance: none; }
.lm-q .inp::-webkit-search-cancel-button { display: none; }
.lm-q .inp::placeholder { color: var(--ink-soft); font-weight: 600; opacity: 1; }
.lm-qi { position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: var(--ink-soft); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.lm-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border: 0; border-radius: 12px; background: none; color: var(--ink-soft); display: grid; place-items: center; cursor: pointer;
}
.lm-clear svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.lm-search .fhelp { margin-top: 8px; }
.lm-status { min-height: 1.4em; margin: 10px 2px 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.lm-status:empty { min-height: 0; margin: 4px 0; }

/* result list; "did you mean" names come under the not-in-our-list card */
.lm-nearh { font-size: 15px; font-weight: 800; color: var(--ink-mid); margin: 18px 2px 10px; }
.lm-hits { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lm-hit {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-align: left; cursor: pointer;
}
.lm-hit:hover { border-color: var(--ink-soft); }
.lm-hn { flex: 1; min-width: 0; }
.lm-hn b { display: block; font-size: 16.5px; line-height: 1.25; }
.lm-hs { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 1px; overflow-wrap: anywhere; }

/* class marks: a dot and a tag; the words always travel with the colour */
.lm-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-soft); }
.lm-dot.compatible { background: var(--green); }
.lm-dot.caution { background: var(--amber); }
.lm-dot.avoid { background: var(--red); }
.lm-dot.nodata { background: transparent; border: 2px solid var(--ink-soft); }
.lm-dot.depends { background: var(--olive); }
.lm-tag {
  flex: none; display: inline-block; font-size: 12px; font-weight: 800; line-height: 1.2; border-radius: 9px;
  padding: 5px 9px; border: 1px solid var(--line); background: var(--band); color: var(--ink-mid); max-width: 9.5em; text-align: center;
}
.lm-tag.compatible { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.lm-tag.caution { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }
.lm-tag.avoid { background: var(--red-bg); border-color: var(--red-line); color: var(--red-ink); }
.lm-tag.depends { background: var(--tint-o); border-color: var(--line); color: var(--olive-d); }
/* narrow phones: the tag drops under the name instead of squeezing it */
@media (max-width: 360px) {
  .lm-hit { flex-wrap: wrap; row-gap: 6px; }
  .lm-hit .lm-hn { flex: 1 1 calc(100% - 24px); }
  .lm-hit .lm-tag { margin-left: 24px; max-width: none; }
}

/* ------------------------------------------------------------ the card --- */
.lm-card, .lm-none { margin: 0 0 8px; }
.lm-name { font-size: 25px; line-height: 1.15; margin: 12px 0 4px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.lm-name:focus { outline: none; }
.lm-name:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.lm-via { font-size: 13.5px !important; color: var(--ink-soft) !important; }
.res p.lm-main { font-size: 16.5px; color: var(--ink); font-weight: 700; margin-top: 10px; }
.res p.lm-mum { color: var(--ink); }
.res p.lm-small, .lm-small { font-size: 13.5px; color: var(--ink-mid); }
.lm-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.lm-block > b { display: block; font-size: 15px; margin-bottom: 6px; }
.lm-block .lm-chips { margin: 8px 0 6px; }
/* urgent infant signs inside a card: the hub's red off-ramp, set on the page
   surface with a red edge so it stands out on a green, amber or red card */
.lm-card .lm-urgent { margin-top: 16px; background: var(--surface); border: 2px solid var(--red-line); }
.res p.lm-lt { font-weight: 700; color: var(--ink); }
.lm-list { margin: 0; padding-left: 20px; font-size: 15px; color: var(--ink-mid); }
.lm-list li + li { margin-top: 3px; }
.lm-keep {
  display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0 !important; padding: 12px 14px;
  border-radius: 16px; background: var(--surface); color: var(--ink) !important; font-weight: 800; font-size: 15px !important;
}
.lm-keep svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--terracotta); stroke-width: 2; stroke-linejoin: round; }
.lm-srcs { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.lm-srcs a, .lm-srcs span { display: inline-flex; align-items: center; min-height: 44px; }
.lm-srcs a { color: var(--ink-mid); font-weight: 800; text-underline-offset: 3px; }
.lm-back { margin-top: 4px; }

/* contraception: time since birth */
.lm-win { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.lm-win legend { font-size: 15px; font-weight: 800; margin-bottom: 8px; padding: 0; }
.lm-win .ans { gap: 8px; }
.lm-win .opt { min-height: 52px; padding: 10px 14px; font-size: 15.5px; }

/* chips: medicine buttons (browse, alternatives, components) */
.lm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lm-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; max-width: 100%;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 14.5px; cursor: pointer; text-align: left; line-height: 1.2;
}
.lm-chip:hover { border-color: var(--ink-soft); }
.lm-chip span:last-child { overflow-wrap: anywhere; }

/* --------------------------------------------------------- page blocks --- */
.lm-stat { display: flex; gap: 14px; align-items: center; margin: 18px 0 4px; padding: 14px 16px; border-radius: 20px; background: var(--green-bg); border: 1px solid var(--green-line); }
.lm-stat b { flex: none; font-size: 26px; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lm-stat p { margin: 0; font-size: 14px; color: var(--ink-mid); }
.lm-browse > summary { font-size: 15.5px; }
.lm-groups { display: grid; gap: 4px 20px; }
.lm-grp h3 { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin: 14px 0 8px; }
.lm-tell { padding: 8px 16px; }
.lm-ticks { list-style: none; margin: 0; padding: 0; }
.lm-ticks li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); font-size: 15px; }
.lm-ticks li:last-child { border: 0; }
.lm-ticks li::before {
  content: ""; position: absolute; left: 2px; top: 14px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--olive-d); border-bottom: 2.5px solid var(--olive-d); transform: rotate(-45deg);
}
.lm-p { margin: 0 0 10px; color: var(--ink-mid); font-size: 15px; }
.lm-who { margin: 0; padding-left: 20px; font-size: 15px; }
.lm-who li { margin: 8px 0; }
.lm-attrib { margin-top: 14px; }

/* ------------------------------------------------------ doctors' table --- */
.lm-rulelist { margin: 0; padding: 0 16px 14px 34px !important; font-size: 14.5px; }
.lm-rulelist li { margin: 6px 0; }
.lm-filters { margin-top: 18px; }
.lm-filters .inp { font-size: 16px; font-weight: 700; }
.lm-count { margin: 12px 2px 0; font-size: 13.5px; font-weight: 800; color: var(--ink-soft); }
.lm-dt { font-size: 13.5px; }
.lm-dt thead th { z-index: 1; }
.lm-dt td p { margin: 0; }
.lm-dt td p + p { margin-top: 6px; }
.lm-dt a { color: var(--olive-d); font-weight: 800; text-underline-offset: 3px; overflow-wrap: anywhere; }
.lm-dn { display: block; font-size: 14.5px; }
.lm-sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.lm-al { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 4px; overflow-wrap: anywhere; }
.lm-dis { font-weight: 700; color: var(--amber-ink); }
.lm-none, .lm-empty { color: var(--ink-soft); }
.lm-mect th[scope="row"] { font-weight: 400; }
.lm-cat { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 9px; font-size: 17px; font-weight: 800; border: 1px solid var(--line); background: var(--band); }
.lm-cat.compatible { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.lm-cat.caution { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }
.lm-cat.avoid { background: var(--red-bg); border-color: var(--red-line); color: var(--red-ink); }
.lm-mect td.num, .lm-mect th.num { text-align: center; }
.lm-mect thead th { min-width: 6.5em; }

/* phones: each table row becomes a card with its own labels */
@media (max-width: 759px) {
  .lm-dtwrap { overflow: visible; border: 0; background: none; }
  .lm-dt, .lm-dt tbody, .lm-dt tr, .lm-dt td { display: block; width: 100%; }
  .lm-dt thead { display: none; }
  .lm-dt tr { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 0; margin-bottom: 10px; }
  .lm-dt td { border: 0; padding: 6px 14px; box-sizing: border-box; }
  .lm-dt td[data-l]::before {
    content: attr(data-l); display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2px;
  }
  .lm-dt td:first-child::before { display: none; }
  .lm-dt td:first-child { padding-top: 8px; }
  .lm-dt .lm-dn { font-size: 17px; }
  .lm-dt tr:last-child td { border-bottom: 0; }
}

/* ------------------------------------------------------ tablet / desktop --- */
@media (min-width: 760px) {
  .lm-h1 { font-size: 32px; margin: 10px 0 12px; }
  .lm-search { padding: 18px 20px 14px; }
  .lm-q .inp { min-height: 60px; font-size: 20px; }
  .lm-name { font-size: 32px; }
  .lm-groups { grid-template-columns: 1fr 1fr; }
  .lm-hit { padding: 12px 18px; }
  .lm-dt td:nth-child(1) { min-width: 150px; width: 17%; }
  .lm-dt td:nth-child(2) { width: 9%; }
  .lm-dt td:nth-child(3), .lm-dt td:nth-child(4) { min-width: 110px; width: 12%; }
  .lm-dt td:nth-child(5) { min-width: 300px; }
  .lm-dt td:nth-child(6) { width: 12%; }
}

@media print {
  .lm-search, .lm-status, .lm-browse, .lm-back, .lm-win, .lm-filters { display: none !important; }
  .lm-dt tr { break-inside: avoid; }
}
