/*
Theme Name: Interview QA — Kadence Child PRO
Template: kadence
Version: 1.1.6
Text Domain: iqa-kadence-child-pro
*/

/* =========================
   Дизайн-переменные (tokens)
   ========================= */
:root{
  --iqa-text:        #1E1E1E;
  --iqa-muted:       #6B7280;
  --iqa-accent:      #2563EB;   /* основной синий */
  --iqa-accent-2:    #3B82F6;   /* для мягкого градиента */
  --iqa-accent-dark: #1E40AF;
  --iqa-success:     #16A34A;
  --iqa-danger:      #DC2626;
  --iqa-bg:          #FFFFFF;

  --iqa-border:      #E5E7EB;
  --iqa-focus:       #93C5FD;

  --iqa-radius:      12px;
  --iqa-radius-lg:   16px;

  --iqa-card-shadow: 0 1px 2px rgba(0,0,0,.05);
  --iqa-card-shadow-lg: 0 8px 24px rgba(0,0,0,.08);
}

/* =========================
   База
   ========================= */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  color:var(--iqa-text);
  background:var(--iqa-bg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height:1.6;
}
a{ color:var(--iqa-accent); text-decoration:none; }
a:hover{ color:var(--iqa-accent-dark); text-decoration:underline; }
a:focus,button:focus,input:focus,select:focus,textarea:focus{ outline:3px solid var(--iqa-focus); outline-offset:2px; }

/* =========================
   Контейнеры / герой
   ========================= */
.iqa-container{ max-width:1200px; margin:0 auto; padding:36px 16px; }

.page-template-iqa-page-hero .entry-hero{ display:none !important; }
.iqa-hero{ max-width:980px; margin:40px auto 28px; text-align:center; }
.iqa-hero h1{
  font-family: Poppins, Inter, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight:700; font-size:54px; line-height:1.12; margin:0 0 22px;
}

.iqa-search{ display:flex; gap:12px; justify-content:center; margin:0 auto 36px; max-width:760px; }
.iqa-search input[type="search"]{
  flex:1; padding:14px 16px; border:1px solid var(--iqa-border); border-radius:var(--iqa-radius); font-size:16px;
}
.iqa-btn{
  background:var(--iqa-accent); color:#fff; border:none; border-radius:var(--iqa-radius);
  padding:12px 18px; font-weight:600; cursor:pointer;
}
.iqa-btn:hover{ background:var(--iqa-accent-dark); }
.iqa-section-title{
  font-family: Poppins, Inter, system-ui;
  font-size:28px; font-weight:700; text-align:center; margin:6px 0 14px;
}

/* =========================
   Роли / грид
   ========================= */
.iqa-role-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:20px; margin-top:10px; }
.iqa-role-card{
  display:flex; align-items:center; justify-content:center; padding:26px 22px;
  border:1px solid var(--iqa-border); border-radius:var(--iqa-radius-lg); background:#fff;
  box-shadow: var(--iqa-card-shadow);
  text-decoration:none; color:var(--iqa-text); font-weight:600; font-size:20px;
  transition: box-shadow .12s ease, border-color .12s ease;
}
/* без смещения layout — только тень/граница */
.iqa-role-card:hover{ box-shadow: var(--iqa-card-shadow-lg); border-color:#D1D5DB; }

/* =========================
   Карточки (универсальные)
   ========================= */
.iqa-muted{ color:var(--iqa-muted); }

.iqa-card{
  position:relative; box-sizing:border-box;
  background:#fff; border:1px solid var(--iqa-border); border-radius:var(--iqa-radius-lg);
  box-shadow: var(--iqa-card-shadow); padding:18px; margin:12px 0;
  transition: box-shadow .2s ease, background-color .2s ease;
}
/* Hover-рамка через псевдоэлемент — не трогаем геометрию */
.iqa-card::after{
  content:""; position:absolute; inset:0; border:2px solid transparent; border-radius:inherit;
  pointer-events:none; transition:border-color .2s ease;
}
.iqa-card:hover, .iqa-card:focus-within{ box-shadow: var(--iqa-card-shadow-lg); background:#fff; }
.iqa-card:hover::after, .iqa-card:focus-within::after{ border-color: var(--iqa-accent); }
/* глушим любые старые «двигатели» */
.iqa-card, .iqa-card:hover, .iqa-card:focus-within{
  transform:none !important; top:auto !important; left:auto !important; margin:inherit; border-width:1px !important;
}
.iqa-card .iqa-card__inner, .iqa-card:hover .iqa-card__inner{ transform:none !important; }
.iqa-card [class*="icon"]{ fill:currentColor; stroke:currentColor; }

/* =========================
   Страница вопроса
   ========================= */
.single-question .iqa-wrap{ max-width:980px; margin:0 auto; padding:0 16px; }
/* карточки внутри single используют те же правила .iqa-card */

/* Рейтинг */
.single-question .iqa-vote-block{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.single-question .iqa-rating-head{ font-weight:600; margin-bottom:6px; }
.single-question .iqa-rating-row{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.single-question .iqa-hardfix-rating{ display:flex; align-items:center; gap:10px; }
.single-question .iqa-hardfix-rating .star{
  font-size:22px; line-height:1; border:0; background:transparent; cursor:pointer;
  color:#D1D5DB; transition: color .08s ease; padding:4px; border-radius:8px;
}
/* актив — СИНИЙ по гайду; без scale, чтобы ничего не «прыгало» */
.single-question .iqa-hardfix-rating .star:hover{ color:var(--iqa-accent); }
.single-question .iqa-hardfix-rating .star.filled{ color:var(--iqa-accent); }
.single-question .iqa-hardfix-rating .meta{ margin-left:4px; opacity:.8; font-size:.95em; color:#374151; }

.single-question .iqa-vote-note{
  display:block; margin-top:8px; color:#065F46; background:#ECFDF5; border:1px solid #A7F3D0;
  border-radius:8px; padding:6px 10px; font-size:14px; box-shadow:0 1px 0 rgba(16,185,129,.15);
}

/* =========================
   Кнопка «Сообщить об ошибке»
   ========================= */
/* универсальный класс + бэкап на старые селекторы */
.iqa-report-open,
.single-question .iqa-report-btn,
.single-question #iqa-open-report{
  --c1: var(--iqa-accent-2);
  --c2: var(--iqa-accent);
  display:inline-flex; align-items:center; justify-content:center;
  min-height:38px; padding:10px 16px;
  border-radius:8px; color:#fff; text-decoration:none; font-weight:700; font-size:14px;
  background:linear-gradient(180deg, var(--c1) 0%, var(--c2) 100%);
  border:1px solid var(--iqa-accent);
  box-shadow:0 12px 28px rgba(37,99,235,.25), 0 2px 4px rgba(37,99,235,.35) inset;
  transition: transform .06s ease, filter .12s ease, box-shadow .12s ease;
}
.iqa-report-open:hover,
.single-question .iqa-report-btn:hover,
.single-question #iqa-open-report:hover{
  filter:brightness(1.05);
  box-shadow:0 16px 32px rgba(37,99,235,.33), 0 2px 6px rgba(37,99,235,.45) inset;
}
.iqa-report-open:active,
.single-question .iqa-report-btn:active,
.single-question #iqa-open-report:active{ transform: translateY(1px); }
.iqa-report-open:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(37,99,235,.25), 0 16px 32px rgba(37,99,235,.33), 0 2px 6px rgba(37,99,235,.45) inset;
}
.iqa-report-open.is-small{ min-height:32px; padding:6px 12px; font-size:13px; }

/* =========================
   Модал «Сообщить об ошибке»
   ========================= */
#iqa-report-modal{
  position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:10000;
  transition: opacity .15s ease, visibility .15s ease;
}
#iqa-report-modal .iqa-modal__box{
  background:#fff; border-radius:var(--iqa-radius); margin:6vh auto; padding:16px;
  box-shadow:0 8px 30px rgba(0,0,0,.12); max-width:560px;
}
#iqa-report-modal.show{ visibility:visible; opacity:1; }
#iqa-report-modal:not(.show){ pointer-events:none; }
#iqa-report-done.show{ display:block; }

/* =========================
   Рейтинг (универсальный виджет)
   ========================= */
.iqa-rating{ display:inline-flex; align-items:center; gap:6px; user-select:none; }
.iqa-rating .star{ font-size:20px; line-height:1; cursor:pointer; color:#D1D5DB; }
.iqa-rating .star.filled{ color:var(--iqa-accent); }
.iqa-rating .meta{ margin-left:6px; opacity:.8; font-size:.9em; }

/* =========================
   Комментарии
   ========================= */
.iqa-comments-area{ margin-top:24px; }
.iqa-comments-title{ margin:0 0 12px; font-weight:700; }
.iqa-comments-empty, .must-log-in, .no-comments{ color:var(--iqa-muted); margin:8px 0 0; }
.must-log-in a{ color:var(--iqa-accent); text-decoration:underline; text-underline-offset:2px; }
.must-log-in a:hover, .must-log-in a:focus-visible{ text-decoration-thickness:2px; }

/* =========================
   Служебные статусы
   ========================= */
.status--ok{ color:var(--iqa-success); }
.status--err{ color:var(--iqa-danger); }

/* =========================
   Адаптив
   ========================= */
@media (max-width:680px){
  .iqa-hero h1{ font-size:36px; }
  .single-question .iqa-hardfix-rating .star{ font-size:20px; }
  .single-question .iqa-report-wrap{ width:100%; }
  .iqa-report-open,
  .single-question .iqa-report-btn,
  .single-question #iqa-open-report{ width:100%; }
}
/* Убираем hover-подсветку у .iqa-card */
.iqa-card:hover{
  background: var(--card-bg) !important;
  box-shadow: var(--card-shadow) !important;
}
.iqa-card:hover::after{
  border-color: transparent !important;
}

/* Оставляем только фокус клавиатурой (доступность) */
.iqa-card:focus-within::after{
  border-color: var(--accent); /* видно табом, но не мышью */
}

/* На всякий случай глушим сторонние эффекты */
.iqa-card:hover,
.iqa-card:hover .iqa-card__inner{
  transform: none !important;
}

/* Primary-кнопка по ТЗ: синий фон, белый текст, радиус 8px, мягкая тень */
:root{ --accent: #2563EB; }

.iqa-btn--primary,
.comment-respond .form-submit input[type="submit"],
.iqa-report-open{
  -webkit-appearance: none;
  appearance: none;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: .55rem 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(37,99,235,.22);
  transition: filter .15s ease, box-shadow .15s ease;
}
.iqa-btn--primary:hover,
.comment-respond .form-submit input[type="submit"]:hover,
.iqa-report-open:hover{
  filter: brightness(.96);
  box-shadow: 0 12px 30px rgba(37,99,235,.28);
}
.iqa-btn--primary:active,
.comment-respond .form-submit input[type="submit"]:active,
.iqa-report-open:active{
  filter: brightness(.92);
  box-shadow: 0 6px 16px rgba(37,99,235,.24);
}
.iqa-btn--primary:focus{ outline: none; }
.iqa-btn--primary:focus-visible,
.comment-respond .form-submit input[type="submit"]:focus-visible,
.iqa-report-open:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 12px 30px rgba(37,99,235,.28);
}

/* Глушим чужие градиенты/рамки от плагинов */
.iqa-report-open,
.iqa-report-open *,
.comment-respond .form-submit input[type="submit"],
.comment-respond .form-submit input[type="submit"] *{
  background-image: none !important;
}
  /* ========================================================================
   Каталог — мобильные фиксы
   ======================================================================== */

/* Глобально не даём флекс/грид-элементам раздувать контейнеры */
.iqa-catalog *, .iqa-catalog *::before, .iqa-catalog *::after{ box-sizing: border-box; }

/* Сетка карточек: 3 → 2 → 1 колонки */
.iqa-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
@media (max-width: 1024px){ .iqa-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 680px){  .iqa-grid{ grid-template-columns:1fr; } }

/* Сайдбар и фильтры — на мобиле кладём сверху и даём воздух */
@media (max-width: 780px){
  .iqa-layout{ display:block; }                  /* если у тебя был 2-колоночный флекс/грид */
  .iqa-sidebar{ position:static; width:auto; margin:0 0 14px; }
  .iqa-filters{ display:grid; gap:10px; padding:12px; }
  .iqa-filters input[type="text"],
  .iqa-filters select,
  .iqa-filters .select,
  .iqa-filters .field{ width:100%; max-width:100%; }

  /* Мультиселект «Темы»: ограничиваем высоту и даём скролл */
  .iqa-filters select[multiple]{
    height:auto; min-height:160px; max-height:40vh;
    overflow:auto; -webkit-overflow-scrolling:touch;
  }

  /* Кнопки фильтров: грид 2 столбца, который сам схлопывается в один ниже 280px */
  .iqa-filters .actions{ display:grid; grid-template-columns:repeat(auto-fit, minmax(140px,1fr)); gap:10px; }
  .iqa-filters .actions .button,
  .iqa-filters .actions .btn,
  .iqa-filters .apply, .iqa-filters .reset{
    min-height:44px; padding:.55rem 1rem;
    white-space:nowrap; overflow-wrap:normal; word-break:keep-all;
    display:inline-flex; align-items:center; justify-content:center;
    border-radius:8px;
  }
}

/* Не даём переносу разбивать кириллицу на последнюю букву */
.iqa-filters .actions .button,
.iqa-filters .actions .btn,
.iqa-filters .apply, .iqa-filters .reset{
  white-space:nowrap; overflow-wrap:normal; word-break:keep-all;
}

/* На узких экранах увеличим кликабельность списков/инпутов */
@media (max-width: 480px){
  .iqa-filters label{ font-size:14px; }
  .iqa-filters input[type="text"],
  .iqa-filters select{ min-height:42px; }
}

/* Карточки не должны уезжать за край (tip: min-width:0 для флекс-детей) */
.iqa-card{ min-width:0; }
/* === Личный кабинет: мобильная шапка и кнопка (<=720px) === */
@media (max-width: 720px){
  /* шапка ЛК столбцом */
  .iqa-ac-head{ display:block; padding:16px; }

  /* блок с кнопкой под заголовком/подзаголовком */
  .iqa-ac-head > div:last-child{ margin-top:10px; }

  /* заголовок — нормальный перенос */
.iqa-ac-title{
  font-size:22px; line-height:1.25;
  white-space:normal;
  word-break:normal;          /* не ломаем слова */
  overflow-wrap:normal;       /* не переносим где попало */
  hyphens:none;               /* вообще без переносов */
  margin:0 0 6px;
}
  .iqa-ac-sub{ margin:0 0 8px; }

  /* кнопка «Выйти» на всю ширину, по центру */
  .iqa-ac-btn{
    display:inline-flex; width:100%; justify-content:center;
  }

  /* мета и «пилюля» email — ровно по сетке на всю ширину */
  .iqa-ac-meta{ display:block; padding:10px 16px 16px; }
  .iqa-pill{ display:block; width:100%; justify-content:flex-start; }
}

/* страховка: белый текст у кнопки в любых состояниях */
.iqa-ac-btn,
.iqa-ac-btn:is(:link,:visited,:hover,:active,:focus){ color:#fff !important; -webkit-text-fill-color:#fff !important; }
/* ЛК: заголовок без идиотских переносов */
.iqa-ac-title{
  font-size:22px; line-height:1.25;
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
  hyphens:none;
  margin:0 0 6px;
}

/* ЛК: мобильное расположение кнопки и меты */
@media (max-width:720px){
  .iqa-ac-wrap .iqa-ac-head{ display:block; padding:16px; }
  .iqa-ac-wrap .iqa-ac-head > div:last-child{ margin-top:10px; }       /* блок с кнопкой ниже заголовка */
  .iqa-ac-wrap .iqa-ac-btn{ display:inline-flex; width:100%; justify-content:center; }  /* «Выйти» на всю ширину */

  .iqa-ac-wrap .iqa-ac-meta{ display:block; padding:10px 16px 16px; }  /* мета в столбик */
  .iqa-ac-wrap .iqa-pill{ display:block; width:100%; justify-content:flex-start; }
}
/* ===== ЛК: Отправленные вопросы — полировка v2 (мобайл) ===== */
@media (max-width:720px){
  /* компактнее карточки */
  .iqa-ac-tr{
    margin:10px 0;
    border-radius:12px;
    box-shadow:0 1px 2px rgba(0,0,0,.04);
  }
  .iqa-ac-td{
    padding:10px 12px;
    border-top:1px solid #F3F4F6;
  }
  .iqa-ac-td:first-child{ border-top:0; }

  /* метки слева — чуть уже и светлее */
  .iqa-ac-td[data-label]{ padding-left:96px; }        /* было 110 */
  .iqa-ac-td[data-label]::before{
    width:78px;                                       /* под новый padding */
    color:#9CA3AF; letter-spacing:.04em;
  }

  /* заголовок вопроса — плотнее, но читабельно */
  .iqa-ac-td[data-label="Вопрос"]{ padding-top:12px; }
  .iqa-ac-td[data-label="Вопрос"] a{
    font-size:15px; line-height:1.35; font-weight:600; color:#111827;
  }

  /* дата слегка крупнее обычного текста */
  .iqa-ac-td[data-label="Дата"]{ font-size:15px; color:#111827; }

  /* статус — выравниваем бейдж и делаем компактным */
  .iqa-ac-td[data-label="Статус"]{
    display:flex; align-items:center;
  }
  .iqa-ac-td[data-label="Статус"] .iqa-badge{
    padding:6px 10px; font-size:12px; line-height:1; border-radius:999px;
  }

  /* пустая причина чуть светлее */
  .iqa-ac-reason--dash{ color:#9CA3AF; }
}

/* очень узкие экраны */
@media (max-width:400px){
  .iqa-ac-td[data-label]{ padding-left:92px; }
  .iqa-ac-td[data-label]::before{ width:74px; }
}