/* ──────────────────────────────────────────────────────────────
   dictionary.ge — ინტერფეისის ვერსია 2  (მიმართულება A)
   2026-09-08

   ჩაირთვება tmpls/master_v2.tmpl.php-დან, default.css-ის ნაცვლად.
   ძველი დიზაინი ხელუხლებელია — გადართვა ?ui=classic / ?ui=v2.

   შიგთავსის ბლოკებს (box1*, box2*, leftBox*) PHP ხატავს
   ფიქსირებული ცხრილებით — აქ ისინი გადაფორმებულია, არა გადაწერილი.
   ────────────────────────────────────────────────────────────── */

:root {
  --plum:        #730044;
  --plum-dark:   #4d002d;
  --plum-light:  #990066;
  --plum-tint:   #faf2f6;
  --plum-line:   #e6ccda;

  --ink:         #1d151a;
  --ink-soft:    #4a3c43;
  --ink-mute:    #6b6067;
  --ink-faint:   #9c8d95;

  --paper:       #ffffff;
  --paper-tint:  #fbfafb;
  --rule:        #e8e2e5;
  --rule-soft:   #f1ecef;

  --sans: "Noto Sans", "Noto Sans Georgian", "BPG Glaho Arial", "BPG Glaho", Sylfaen, system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ipa: "Charis SIL", "Doulos SIL", "Gentium", "DejaVu Sans", "Arial Unicode MS", serif;

  --wrap: 1180px;
}

/* ── საბაზისო ──────────────────────────────────────────────── */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--plum); text-decoration: none; }
a:hover { color: var(--plum-dark); text-decoration: underline; }

img { max-width: 100%; border: 0; }

p { margin: 0 0 1em; }

/* ── ჩარჩო ─────────────────────────────────────────────────── */

.v2-utility {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 7px 24px;
  background: var(--paper-tint);
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12.5px;
  color: var(--ink-faint);
}
.v2-utility a { color: var(--ink-mute); }
.v2-utility a:hover { color: var(--plum); }

.v2-masthead {
  background: var(--plum);
  padding: 18px 24px;
}
.v2-masthead-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.v2-mark { flex: 0 0 auto; line-height: 0; }
.v2-mark img { height: 44px; width: auto; }
.v2-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-decoration: none;
}
.v2-title:hover { color: #ffffff; text-decoration: none; }
.v2-sub {
  font-size: 12px;
  color: #d9a9c4;
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.v2-masthead .languageSwitch { margin-left: auto; }
.v2-masthead .languageSwitch a { color: #f2dbe7; font-size: 13px; font-weight: 600; }

.v2-bar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.v2-bar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.v2-bar .mainMenu { font-size: 13.5px; color: var(--ink-mute); }
.v2-bar .mainMenu a { color: var(--ink-mute); font-weight: 500; }
.v2-bar .mainMenu a:hover { color: var(--plum); }

.v2-search { flex: 1 1 320px; min-width: 260px; max-width: 460px; }

.v2-letters {
  background: var(--paper-tint);
  border-bottom: 1px solid var(--rule-soft);
}
.v2-letters-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 24px;
}

.letterMenu { font-family: var(--sans); padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.letterMenu a,
.letterMenu a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--plum);
  border-radius: 3px;
  text-decoration: none;
}
.letterMenu a:hover { background: var(--plum-tint); text-decoration: none; }
.letterMenu a#disabled { color: #cfc4ca; pointer-events: none; }
.letterMenu a#small { border-bottom: 1px dotted var(--ink-faint); }

/* ── განლაგება ─────────────────────────────────────────────── */

.v2-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 24px 44px;
  display: flex;
  gap: 34px;
  align-items: flex-start;
}
.v2-content { flex: 1 1 auto; min-width: 0; }
/* HTML-ში შიგთავსი პირველია (ვიწრო ეკრანისთვის), ფართოზე მარცხნივ იწევს გვერდითა სვეტი */
.v2-side { flex: 0 0 268px; width: 268px; order: -1; }

/* ── სიტყვა-სტატია ─────────────────────────────────────────── */

.box1Word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.box1Type,
.box1type {
  font-family: var(--sans);
  color: var(--ink-faint);
  font-size: 13px;
  font-style: italic;
  white-space: nowrap;
}
.box1Pron {
  font-family: var(--ipa);
  font-size: 17px;
  color: var(--ink-mute);
}
.box1Desc {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  padding-top: 14px;
  text-align: left;
  font-family: var(--sans);
  max-width: 62ch;
}
.box1Desc p { font-family: var(--sans); margin: 0 0 0.9em; }
.box1Desc i, .box1Desc em { color: var(--ink-faint); }
.box1Desc b, .box1Desc strong { color: var(--ink); font-weight: 600; }

/* r-ტეგი — ჯვარედინი მიმართვა */
.box1Desc r, .box2Desc r { font-style: normal; }

/* ── სიის ელემენტი ─────────────────────────────────────────── */

.box2Title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.box2Word {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
}
.box2Word a { color: var(--ink); }
.box2Word a:hover { color: var(--plum); text-decoration: none; }
.box2Type {
  font-family: var(--sans);
  font-size: 11.5px;
  font-style: italic;
  color: var(--ink-faint);
  padding: 0 6px;
}
.box2Desc {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.55;
}

/* ── გვერდითა ბლოკები ──────────────────────────────────────── */

.leftBoxTitle,
.leftBox2Title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 0 10px;
  background: none;
  border: 0;
}
#recentAdditionsArrow { opacity: 0.45; }
.hand { cursor: pointer; }

.leftBox,
.leftBox2,
.leftBox3,
.leftBox4 {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  background: none;
  border: 0;
  padding: 6px 0 14px;
}

/* ძველ CSS-ში სიის ელემენტებს bullet-GIF და display:block ჰყოფდა —
   აქ იგივე როლს ღია მარცხენა ხაზი და საკუთარი მარკერი ასრულებს */
.leftBox a,
.leftBox a:visited,
.leftBox3 a,
.leftBox3 a:visited,
.leftBoxCurrentWord,
.leftBoxCurrentItem {
  display: block;
  position: relative;
  padding: 3px 0 3px 15px;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 2px;
}
.leftBox a::before,
.leftBox3 a::before,
.leftBoxCurrentWord::before,
.leftBoxCurrentItem::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.95em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--plum-line);
}
.leftBox a:hover,
.leftBox3 a:hover { color: var(--plum); background: var(--plum-tint); text-decoration: none; }
.leftBox a:hover::before,
.leftBox3 a:hover::before { background: var(--plum); }

.leftBoxCurrentWord,
.leftBoxCurrentItem { color: var(--plum); font-weight: 600; }
.leftBoxCurrentWord::before,
.leftBoxCurrentItem::before { background: var(--plum); }

.leftBox2 a, .leftBox4 a { color: var(--ink-soft); text-decoration: none; }
.leftBox2 a:hover, .leftBox4 a:hover { color: var(--plum); }

/* ── ნავიგაცია, პაგინაცია ──────────────────────────────────── */

.prevWord, .nextWord { font-family: var(--serif); font-size: 14px; }
.prevWord a, .prevWord a:visited,
.nextWord a, .nextWord a:visited { color: var(--plum); text-decoration: none; }
.prevWord a:hover, .nextWord a:hover { text-decoration: underline; }
.prevWord a::before { content: "\2039\a0"; color: var(--ink-faint); }
.nextWord a::after  { content: "\a0\203A"; color: var(--ink-faint); }

.pagination {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
}
.pagination a,
.pagination a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 24px;
  padding: 0 6px;
  color: var(--ink-mute);
  border-radius: 3px;
  text-decoration: none;
}
.pagination a:hover { background: var(--plum-tint); color: var(--plum); text-decoration: none; }
.pagination #current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 24px;
  padding: 0 6px;
  background: var(--plum);
  color: #ffffff;
  border-radius: 3px;
}
.pagination #disabled { color: #d4cbd0; padding: 0 6px; }

/* ── ძიების ველი ───────────────────────────────────────────── */

.searchString {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  border: 1.5px solid #d6cdd2;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  padding: 9px 12px;
  width: 100%;
  outline: none;
  background: #ffffff;
}
.searchString:focus { border-color: var(--plum-light); }
.searchButton {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: var(--plum);
  border: 0;
  border-radius: 0 4px 4px 0;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
}
.searchButton:hover { background: var(--plum-dark); }
.searchIn { font-size: 12px; color: var(--ink-faint); padding-top: 6px; }
.searchIn input { vertical-align: middle; margin: 0 4px 0 0; }

.suggestionWrapper { position: relative; }
.suggestionBox {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(40, 0, 22, 0.14);
  padding: 4px 0;
}
.suggestionItem {
  font-family: var(--serif);
  font-size: 14.5px;
  padding: 6px 12px;
  cursor: pointer;
}
.suggestionItem:hover { background: var(--plum-tint); }

/* ── შეტყობინებები ─────────────────────────────────────────── */

.msg, .notice, .reddishNotice {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--plum);
  border-radius: 3px;
  background: var(--paper-tint);
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.msg #title { font-weight: 600; margin-bottom: 4px; }
.formError { color: #9c2b2b; font-size: 13px; }

.pageTitle, .pageTitle2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.highlight { background: #fdf0b8; padding: 0 1px; border-radius: 2px; }

/* ── ენა-სპეციფიკური ───────────────────────────────────────── */

.en { font-family: var(--serif); }
.ka { font-family: var(--sans); }
.regularText { font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); }
.regularText ul, .box1Desc ul { padding-left: 20px; margin: 8px 0; }
.smallText { font-size: 12.5px; color: var(--ink-faint); }
.largeText { font-size: 17px; }
.justified, .justifiedText { text-align: left; }

/* ── ფუტერი ────────────────────────────────────────────────── */

.v2-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-tint);
  margin-top: 20px;
}
.v2-footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px 24px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 34px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.65;
}
.footerNotice { flex: 1 1 380px; min-width: 260px; }
.footer, .footerCounter { flex: 0 0 auto; }
.v2-footer a { color: var(--ink-mute); }

/* ── ძველი ჩარჩოს განეიტრალება შიგთავსში ───────────────────── */
/*    (ბლოკებს PHP ხატავს კუთხის GIF-ებით და 650px ცხრილებით)   */

.v2-content table { width: 100% !important; max-width: 100%; border-collapse: collapse; }
.v2-content img[src*="box1_"],
.v2-content img[src*="box2_"],
.v2-content img[src*="_corner_"],
.v2-content img[src*="blank.gif"] { display: none !important; }
.v2-content td[bgcolor] { background: transparent !important; }
/* msg()-ის გარსი <div align=right>-ითაა — v2-ში ტექსტი მარცხნიდან იკითხება */
.v2-content div[align=right] { text-align: left; }
/* ბეჭდვის ღილაკი ერთადერთი სურათია, რომელიც უნდა დარჩეს */
.v2-content img[src*="print.gif"] { display: inline !important; opacity: 0.5; }
.v2-content img[src*="print.gif"]:hover { opacity: 1; }

/* სიტყვა-სტატიის სათაურსა და განმარტებას შორის თხელი ხაზი */
.v2-content td.box1Desc { border-top: 1px solid var(--rule); }
.v2-side table { width: 100% !important; border-collapse: collapse; }
.v2-side img[src*="box"],
.v2-side img[src*="/lbt_"],
.v2-side img[src*="/lbb_"],
.v2-side img[src*="_corner_"],
.v2-side img[src*="blank.gif"] { display: none !important; }
.v2-side table td:empty { padding: 0 !important; width: 0 !important; }
.v2-side td[bgcolor] { background: transparent !important; }

#wordData { margin: 0; }

/* ── გადამრთველი ───────────────────────────────────────────── */

.v2-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-faint);
}
.v2-switch a {
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 2px 8px;
  background: #ffffff;
}
.v2-switch a:hover { color: var(--plum); border-color: var(--plum-line); text-decoration: none; }

/* ── ვიწრო ეკრანი ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .v2-main { flex-direction: column; gap: 26px; }
  .v2-side { flex: 1 1 auto; width: 100%; order: 1; }
  .box1Word { font-size: 27px; }
  .v2-bar-inner { gap: 14px; }
  .v2-search { max-width: none; }
}

@media (max-width: 560px) {
  .v2-masthead-inner { gap: 12px; }
  .v2-mark img { height: 34px; }
  .v2-title { font-size: 17px; }
  .v2-sub { display: none; }
  .v2-main { padding: 20px 16px 34px; }
  .v2-utility, .v2-bar-inner, .v2-letters-inner, .v2-footer-inner { padding-left: 16px; padding-right: 16px; }
  .box1Word { font-size: 24px; }
  .box1Desc { font-size: 16px; }
  .letterMenu a { min-width: 30px; height: 30px; }
}

/* ── საძიებო ფორმა (boxes/search.box.php-ის მარკაპი) ───────── */

.v2-search { position: relative; }

#searchForm {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0;
}
#searchForm .searchString { flex: 1 1 auto; width: auto; min-width: 0; }
#searchForm .searchButton { flex: 0 0 auto; }
#searchForm br { display: none; }
#searchForm .searchIn { flex: 1 0 100%; }
#searchForm .searchIn label { cursor: pointer; }
#searchForm .searchIn img { vertical-align: middle; cursor: pointer; }

/* ძველი CSS ამ ბლოკს top:188px-ზე აჩერებდა — v2-ში ველზეა მიმაგრებული */
.suggestionWrapper {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-width: 340px;
  z-index: 40;
  overflow: visible;
}

/* ── div_based.css-ის გადაფარვა ────────────────────────────── */

.lb { font-size: 13.5px; padding: 0 0 18px; }
.lb #title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0 0 7px;
}
.lb #body { padding-top: 10px; text-align: left; color: var(--ink-soft); }
.lb #newsDate, .lb #viewFull { color: var(--ink-faint); font-size: 12px; }
.lb #newsData a { color: var(--ink-soft); }

.news { font-size: 14px; }
.news #date { background: var(--plum-tint) !important; color: var(--ink-mute); padding: 4px 8px; border-radius: 3px; }
.news #data { background: none !important; }

.corporateUser #title { color: var(--ink-mute); }

/* ── სიტყვა-სტატიის სათაურის ბლოკი ─────────────────────────── */
/*  კოდი მას სამსვეტიან ცხრილად ხატავს: სიტყვა | ცარიელი | ტიპი,
    მეორე რიგში კი ტრანსკრიფცია მესამე სვეტში ხვდება და ცურდება.
    v2-ში ეს ცხრილი ორ ჩვეულებრივ სტრიქონად იშლება.
    :has()-ის გარეშე გვერდი უბრალოდ ძველნაირად დარჩება, არ იშლება. */

/* გარე ცხრილის ცარიელი <td width=100%> (ძველი ჩარჩოს ფონისთვის იყო)
   სათაურის უჯრას min-content-მდე ავიწროებდა — v2-ში განეიტრალებულია */
.v2-content table td[width="100%"]:empty { width: auto !important; padding: 0 !important; }

.v2-content table:has(> tbody > tr > td.box1Word) { display: block; width: auto !important; }
.v2-content table:has(> tbody > tr > td.box1Word) > tbody,
.v2-content table:has(> tbody > tr > td.box1Word) > tbody > tr { display: block; }
.v2-content table:has(> tbody > tr > td.box1Word) > tbody > tr > td {
  display: inline;
  padding: 0;
  width: auto !important;
}
.v2-content td.box1Word { padding-right: 10px !important; vertical-align: baseline; }
.v2-content td.box1type,
.v2-content td.box1Type { vertical-align: baseline; }
.v2-content td.box1Pron { vertical-align: baseline; }
.v2-content td.box1Desc { padding: 16px 0 4px; }

/* წინა / შემდეგი სიტყვა */
.v2-content td.prevWord { padding-left: 0 !important; padding-top: 22px; }
.v2-content td.nextWord { padding-top: 22px; }
