@charset "UTF-8";
/* ==========================================================================
   GidTalk.ru — Layout Cleanup & Mobile Responsive Layer (2026)
   ========================================================================== */

:root {
  --gt-target-size: 24px;
  --gt-border: #CCCCCC;
  --gt-bg-card: #FDFEFF;
}

@media (pointer: coarse) {
  :root {
    --gt-target-size: 44px;
  }
}

/* Base safety & overflow prevention (never clip via overflow-x:hidden on html/body) */
.gt-page,
.gt-page *,
.gt-page *::before,
.gt-page *::after,
.gt-header-table,
.gt-header-table * {
  box-sizing: border-box;
}

body {
  overflow-wrap: break-word;
}

:where(a, code) {
  overflow-wrap: anywhere;
}

.gt-page img,
.gt-page video,
.gt-header-table img {
  max-inline-size: 100%;
  block-size: auto;
}

/* Collapse unfilled/dead third-party ad placeholders */
ins.adsbygoogle[data-ad-status="unfilled"],
ins.adsbygoogle:empty,
#rotaban_227033:empty,
#rotaban_195751:empty {
  display: none !important;
  block-size: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Page shell */
.gt-header-table {
  max-inline-size: 1300px;
  inline-size: 100%;
  margin-inline: auto;
  background: #ffffff;
}

.gt-header-table td {
  padding: 8px 20px;
}

.gt-page {
  max-inline-size: 1300px;
  inline-size: 100%;
  margin-inline: auto;
  text-align: left;
  container: gt-page / inline-size;
}

.gt-page-inner {
  padding: 0 20px;
}

/* Main + Sidebar table wrapper */
.gt-layout {
  inline-size: 100%;
  border-collapse: collapse;
  margin-block-start: 10px;
}

.gt-layout > tbody > tr > td.gt-main {
  vertical-align: top;
  inline-size: 100%;
  min-inline-size: 0;
}

.gt-layout > tbody > tr > td.gt-spacer {
  inline-size: 14px;
  min-inline-size: 14px;
}

.gt-layout > tbody > tr > td.gt-sidebar {
  vertical-align: top;
  inline-size: 280px;
  min-inline-size: 280px;
}

.gt-sidebar .gt-sb-banner {
  text-align: center;
}

.gt-sb-block {
  margin-block-end: 10px;
}

.gt-sb-block:last-child {
  margin-block-end: 0;
}

/* Accessible focus rings */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #255A93;
  outline-offset: 2px;
}

.gt-cat-header {
  inline-size: 100%;
}

.gt-forum-table {
  margin-block-end: 12px;
}

/* Post message overflow protection */
td[id^="td_post_"] {
  min-inline-size: 0;
}

div[id^="post_message_"] {
  overflow-wrap: break-word;
  max-inline-size: 100%;
}

div[id^="post_message_"] pre,
div[id^="post_message_"] .bbcode_container pre,
div[id^="post_message_"] div[style*="width: 640px"],
div[id^="post_message_"] div[style*="width:640px"] {
  inline-size: auto !important;
  width: auto !important;
  max-inline-size: 100% !important;
  overflow-x: auto;
  box-sizing: border-box;
}

div[id^="post_message_"] table,
div[id^="post_message_"] iframe,
div[id^="post_message_"] embed,
div[id^="post_message_"] object {
  max-inline-size: 100% !important;
}

/* Forms & Newthread responsive width */
td.panelsurround .panel > div[style*="width"] {
  inline-size: 100% !important;
  max-inline-size: 640px;
}

textarea,
input.bginput,
select {
  max-inline-size: 100%;
}

/* Sidebar stacking when container <= 900px */
@container gt-page (inline-size <= 900px) {
  .gt-layout,
  .gt-layout > tbody,
  .gt-layout > tbody > tr,
  .gt-layout > tbody > tr > td.gt-main,
  .gt-layout > tbody > tr > td.gt-sidebar {
    display: block;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
  }

  .gt-layout > tbody > tr > td.gt-spacer {
    display: none;
  }

  .gt-layout > tbody > tr > td.gt-sidebar {
    margin-block-start: 14px;
  }

  .gt-sidebar .gt-sb-banner {
    text-align: center;
  }
}

/* Mobile & narrow container adaptation (<= 768px) */
@media (max-width: 768px) {
  .gt-header-table td {
    padding: 8px 10px;
    text-align: center;
  }

  .gt-page-inner {
    padding: 0 8px;
  }
}

@container gt-page (inline-size <= 768px) {
  /* Breadcrumb + Login / Welcome bar */
  .gt-nav-header,
  .gt-nav-header > tbody,
  .gt-nav-header > tbody > tr,
  .gt-nav-header > tbody > tr > td {
    display: block;
    inline-size: 100% !important;
    white-space: normal !important;
  }

  .gt-nav-header > tbody > tr > td.alt2 {
    border-block-start: 1px solid var(--gt-border);
    padding: 8px !important;
  }

  .gt-nav-header form table {
    inline-size: 100%;
  }

  .gt-nav-header form table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-block-end: 4px;
  }

  .gt-nav-header form table td {
    display: inline-block;
    white-space: normal !important;
  }

  /* Primary navigation bar wrapping */
  .gt-nav-bar table,
  .gt-nav-bar tbody,
  .gt-nav-bar tr {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    inline-size: 100%;
  }

  .gt-nav-bar td.vbmenu_control {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-block-size: var(--gt-target-size);
    padding: 4px 8px;
    white-space: nowrap;
  }

  .gt-nav-bar td.vbmenu_control a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 100%;
    min-block-size: var(--gt-target-size);
  }

  /* Allow long nowrap lines in forum widgets to wrap */
  .gt-page [style*="white-space: nowrap"],
  .gt-page [style*="white-space:nowrap"] {
    white-space: normal !important;
  }

  .gt-page .vbmenu_popup [style*="white-space: nowrap"],
  .gt-page .vbmenu_popup [style*="white-space:nowrap"] {
    white-space: nowrap !important;
  }

  /* Category header bar: hide wide 140px decorative corner cells */
  .gt-cat-header td:first-child,
  .gt-cat-header td:last-child {
    display: none;
  }

  .gt-cat-header td:nth-child(2) {
    padding: 8px 10px;
  }

  /* Forum list table -> stacked cards */
  .gt-forum-table,
  .gt-forum-table > tbody,
  .gt-forum-table > tbody > tr {
    display: block;
    inline-size: 100%;
  }

  .gt-forum-table > tbody > tr:first-child {
    display: none;
  }

  .gt-forum-table > tbody > tr:not(:first-child) {
    border-block-end: 2px solid var(--gt-border);
    padding: 8px;
    background: var(--gt-bg-card);
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td {
    display: block;
    inline-size: 100% !important;
    text-align: left !important;
    padding: 3px 0 !important;
    background: transparent !important;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(1) {
    float: left;
    inline-size: auto !important;
    margin-inline-end: 8px;
    padding-block-start: 2px !important;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(2) {
    overflow: hidden;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(3) {
    clear: both;
    font-size: 11px;
    padding-block-start: 6px !important;
    border-block-start: 1px dashed #d6dce6;
    margin-block-start: 4px;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(3)::before {
    content: "\041F\043E\0441\043B\0435\0434\043D\0435\0435\0020\0441\043E\043E\0431\0449\0435\043D\0438\0435\003A\0020";
    font-weight: bold;
    color: #444;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(4),
  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(5) {
    display: inline-block;
    inline-size: auto !important;
    font-size: 11px;
    color: #444;
    margin-inline-end: 12px;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(4)::before {
    content: "\0422\0435\043C\003A\0020";
    font-weight: bold;
  }

  .gt-forum-table > tbody > tr:not(:first-child) > td:nth-child(5)::before {
    content: "\0421\043E\043E\0431\0449\0435\043D\0438\0439\003A\0020";
    font-weight: bold;
  }

  /* Thread list table (#threadslist) -> stacked cards */
  #threadslist,
  #threadslist > tbody,
  #threadslist > tbody > tr {
    display: block;
    inline-size: 100%;
  }

  #threadslist > tbody > tr:has(> td.thead) {
    display: none;
  }

  #threadslist > tbody > tr:not(:has(> td.thead)) {
    border-block-end: 2px solid var(--gt-border);
    padding: 8px;
    background: var(--gt-bg-card);
  }

  #threadslist > tbody > tr > td {
    display: block;
    inline-size: 100% !important;
    text-align: left !important;
    padding: 3px 0 !important;
    background: transparent !important;
  }

  #threadslist > tbody > tr > td[id^="td_threadstatusicon_"],
  #threadslist > tbody > tr > td[id^="td_threadstatusicon_"] + td {
    float: left;
    inline-size: auto !important;
    margin-inline-end: 8px;
  }

  #threadslist > tbody > tr > td[id^="td_threadtitle_"] {
    inline-size: auto !important;
    overflow: hidden;
  }

  #threadslist > tbody > tr > td[id^="td_threadtitle_"] ~ td.alt2[title] {
    clear: both;
    font-size: 11px;
    border-block-start: 1px dashed #d6dce6;
    margin-block-start: 4px;
    padding-block-start: 5px !important;
  }

  #threadslist > tbody > tr > td[id^="td_threadtitle_"] ~ td.alt2[title] > div.smallfont {
    text-align: left !important;
  }

  #threadslist > tbody > tr > td[id^="td_threadtitle_"] ~ td.alt1[align="center"],
  #threadslist > tbody > tr > td[id^="td_threadtitle_"] ~ td.alt2[align="center"] {
    display: inline-block;
    inline-size: auto !important;
    font-size: 11px;
    margin-inline-end: 12px;
    color: #444;
  }

  #threadslist > tbody > tr > td[id^="td_threadtitle_"] ~ td.alt1[align="center"]::before {
    content: "\041E\0442\0432\0435\0442\043E\0432\003A\0020";
    font-weight: bold;
  }

  #threadslist > tbody > tr > td[id^="td_threadtitle_"] ~ td.alt2[align="center"]::before {
    content: "\041F\0440\043E\0441\043C\043E\0442\0440\043E\0432\003A\0020";
    font-weight: bold;
  }

  /* Cyb Advanced Forum Statistics table: stack sections & contain wide inner table */
  table:has(#collapseobj_cyb_fh_stats),
  table:has(#collapseobj_cyb_fh_stats) > thead,
  table:has(#collapseobj_cyb_fh_stats) > tbody,
  table:has(#collapseobj_cyb_fh_stats) > thead > tr,
  table:has(#collapseobj_cyb_fh_stats) > tbody > tr,
  table:has(#collapseobj_cyb_fh_stats) > thead > tr > td,
  table:has(#collapseobj_cyb_fh_stats) > tbody > tr > td {
    display: block;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
  }

  table:has(#collapseobj_cyb_fh_stats) > tbody > tr > td {
    overflow-x: auto;
  }

  /* Thread tools / Forum tools bar */
  table:has(> tbody > tr > td#threadtools),
  table:has(> tbody > tr > td#forumtools),
  table:has(> tbody > tr > td#threadtools) > tbody,
  table:has(> tbody > tr > td#forumtools) > tbody {
    display: block;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
  }

  table:has(> tbody > tr > td#threadtools) > tbody > tr,
  table:has(> tbody > tr > td#forumtools) > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    inline-size: 100%;
    gap: 2px;
    background: #255A93;
    padding: 2px;
  }

  table:has(> tbody > tr > td#threadtools) > tbody > tr > td.tcat,
  table:has(> tbody > tr > td#forumtools) > tbody > tr > td.tcat,
  table:has(> tbody > tr > td#threadtools) > tbody > tr > td#imod {
    display: none !important;
  }

  table:has(> tbody > tr > td#threadtools) > tbody > tr > td.vbmenu_control,
  table:has(> tbody > tr > td#forumtools) > tbody > tr > td.vbmenu_control {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px 6px;
    white-space: nowrap;
    min-inline-size: 0;
  }

  /* Forumdisplay Display Options form */
  table:has(#sel_daysprune) > tbody > tr,
  table:has(#sel_daysprune) > tbody > tr > td {
    display: block;
    inline-size: 100% !important;
  }

  table:has(#sel_daysprune) table,
  table:has(#sel_daysprune) table > tbody,
  table:has(#sel_daysprune) table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    inline-size: 100%;
  }

  table:has(#sel_daysprune) table > tbody > tr > td {
    display: block;
    flex: 1 1 140px;
    padding: 0 !important;
    text-align: left !important;
  }

  /* Forum rules + Quick Jump (forumjump) side-by-side layout */
  table:has(select[name="f"]):not(.gt-nav-bar):not(.gt-footer-bar),
  table:has(select[name="f"]):not(.gt-nav-bar):not(.gt-footer-bar) > tbody,
  table:has(select[name="f"]):not(.gt-nav-bar):not(.gt-footer-bar) > tbody > tr,
  table:has(select[name="f"]):not(.gt-nav-bar):not(.gt-footer-bar) > tbody > tr > td {
    display: block;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    text-align: left !important;
  }

  .gt-page select {
    max-inline-size: 100% !important;
  }

  /* Generic wide multi-column tables (Similar Threads, Subforums, xperience, etc.) */
  table.tborder:not([id^="post"]):not(.gt-nav-header):not(.gt-forum-table):not(#threadslist):not(.gt-stats-table):not(:has(#collapseobj_cyb_fh_stats)):has(> tbody > tr > td.thead:nth-child(4)) {
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    overflow-x: auto;
  }

  /* vBExperience tabs & stats responsive stacking */
  .xperience_tabs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
  }

  .xperience_tabs a {
    float: none !important;
  }

  table.tborder:has(.fieldset) > tbody > tr > td[width="20%"] {
    display: block;
    inline-size: 100% !important;
  }

  /* Thread title & pagination safety on mobile */
  .gt-page h1 {
    font-size: 18px;
    line-height: 1.3;
    margin: 8px 0;
    overflow-wrap: break-word;
  }

  .gt-page .pagenav {
    max-inline-size: 100%;
    overflow-x: auto;
  }

  .gt-page .pagenav table,
  .gt-page .pagenav tbody {
    display: block !important;
    inline-size: auto !important;
  }

  .gt-page .pagenav tr {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px;
    align-items: center;
  }

  .gt-page .pagenav td {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    inline-size: auto !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
  }

  /* Postbit (thread posts) -> clean block stack with zero horizontal overflow */
  table[id^="post"],
  table[id^="post"] > tbody {
    display: block;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
  }

  table[id^="post"] > tbody > tr:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    inline-size: 100%;
  }

  table[id^="post"] > tbody > tr:first-child > td.thead {
    display: block;
    flex: 1 1 auto;
    min-inline-size: 0;
  }

  table[id^="post"] > tbody > tr:first-child > td.thead:last-child {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  table[id^="post"] > tbody > tr[valign="top"] {
    display: block;
    inline-size: 100%;
  }

  table[id^="post"] > tbody > tr[valign="top"] > td.alt2[width="175"],
  table[id^="post"] > tbody > tr[valign="top"] > td[id^="td_post_"] {
    display: block;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    border-inline: 1px solid var(--gt-border) !important;
    min-inline-size: 0;
  }

  table[id^="post"] > tbody > tr[valign="top"] > td.alt2[width="175"] {
    border-block-end: 1px solid var(--gt-border) !important;
    padding: 8px 10px !important;
    overflow: hidden;
  }

  /* Compact author avatar + meta on mobile */
  table[id^="post"] > tbody > tr[valign="top"] > td.alt2[width="175"] > div.smallfont:has(img[src*="avatar"]),
  table[id^="post"] > tbody > tr[valign="top"] > td.alt2[width="175"] > div.smallfont:has(a[href*="member.php"] > img) {
    float: left;
    margin: 4px 10px 4px 0;
  }

  table[id^="post"] > tbody > tr[valign="top"] > td.alt2[width="175"] img[src*="avatar"],
  table[id^="post"] > tbody > tr[valign="top"] > td.alt2[width="175"] a[href*="member.php"] > img {
    max-inline-size: 56px;
    max-block-size: 56px;
    object-fit: cover;
    border-radius: 4px;
  }

  table[id^="post"] > tbody > tr[valign="top"] > td[id^="td_post_"] {
    padding: 10px !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  table[id^="post"] > tbody > tr[valign="top"] > td[id^="td_post_"] [style*="width:"] {
    max-inline-size: 100% !important;
  }

  table[id^="post"] > tbody > tr:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    inline-size: 100%;
  }

  table[id^="post"] > tbody > tr:last-child > td {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    inline-size: auto !important;
    flex: 1 1 auto;
    text-align: left !important;
    border-inline: none !important;
  }

  table[id^="post"] > tbody > tr:last-child > td:last-child {
    justify-content: flex-end;
  }

  /* Footer bar stacking */
  .gt-footer-bar,
  .gt-footer-bar > tbody,
  .gt-footer-bar > tbody > tr,
  .gt-footer-bar > tbody > tr > td {
    display: block;
    inline-size: 100% !important;
    text-align: center !important;
  }

  .gt-footer-bar > tbody > tr > td.tfoot {
    padding: 6px 8px;
  }

  .gt-stats-table .alt2 {
    display: none;
  }
}

/* Touch device control sizing (WCAG 2.5.5) */
@media (pointer: coarse) {
  :where(.gt-nav-bar .vbmenu_control a, .gt-page input[type="submit"], .gt-page input[type="button"], .gt-page button, .gt-page select) {
    min-block-size: var(--gt-target-size);
  }
}

/* Very narrow mobile screens (<= 380px): fit 304px reCAPTCHA widget */
@media (max-width: 380px) {
  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: 0 0;
  }
}
