/* =========================================================================
   Группы ОК — стили вкладки (поверх base.css = готовая вёрстка шапки).
   База (шапка, иконочные шрифты, анимации, svg-label, --fvw) — в base.css.
   Здесь только контент вкладки + попап. Десктоп (макет 1920px), без адаптива.
   Размеры взяты из Figma (1:1).
   ========================================================================= */

:root { --gold: #FFDD00; --ink: #62560E; }

/* Лого в шапке (base.css задаёт .logo размеры) */
.logo svg { width: 100%; height: 100%; }

/* ----- Контент вкладки ----- */
.ok-page {
  background: #FFFCEC;
  min-height: calc(100vh - 60px);
  padding: 30px 53px;
  box-sizing: border-box;
}

/* Кнопка «Добавить группу в ОК» (Figma: 292x50, #FED839, r4) */
.ok-addgroup-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; min-width: 292px; padding: 0 24px;
  background: #FED839; border: 1px solid #FED839; border-radius: 4px;
  color: var(--ink); font-family: 'Roboto', sans-serif; font-weight: 300;
  font-size: 21px; line-height: 1; cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease;
}
.ok-addgroup-btn:hover { filter: brightness(.97); box-shadow: 0 2px 6px rgba(98,86,14,.18); }
.ok-addgroup-btn:active { filter: brightness(.93); }

.ok-groups { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }

/* ----- Карточка группы ----- */
.ok-card {
  background: #FFFFFF; border-radius: 4px; border: 1px solid #F0ECDA;
  box-shadow: 0 1px 4px rgba(98,86,14,.06);
  overflow: hidden;
}
.ok-card-head {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 28px; min-height: 30px;
}
.ok-card-num { color: var(--ink); font-size: 24px; font-weight: 400; white-space: nowrap; }
.ok-card-title { color: var(--ink); font-size: 24px; font-weight: 400; flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ok-card-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

/* Иконки-кнопки карточки (карандаш / крестик-удаление / стрелка) */
.ok-icon-btn {
  width: 30px; height: 30px; padding: 0; border: 0; background: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: #0F0F0F; transition: color .15s ease, transform .15s ease;
}
.ok-icon-btn svg { width: 100%; height: 100%; fill: currentColor; }
.ok-icon-btn:hover { color: #0087FC; }
.ok-del:hover { color: #E23B3B; }
.ok-expand .ok-arrow { transition: transform .2s ease; }
.ok-card.is-open .ok-expand .ok-arrow { transform: rotate(180deg); }

/* Тело карточки (раскрывается стрелкой, п.8) */
.ok-card-body { display: none; padding: 6px 28px 26px; border-top: 1px solid #F4F0DF; }
.ok-card.is-open .ok-card-body { display: block; }

/* Введённые в попапе данные */
.ok-data { margin: 12px 0 22px; display: flex; flex-direction: column; gap: 10px; }
.ok-data-row { color: var(--ink); font-size: 24px; font-weight: 400; }
.ok-data-row b { font-weight: 400; }

/* ----- Настройки (пп. 9–13): поля и чекбоксы ----- */
.ok-settings { display: flex; flex-direction: column; gap: 14px; }
.ok-set-field { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ok-set-label { color: var(--ink); font-size: 21px; font-weight: 300; }

/* Маленькое инлайн-поле (минуты — только цифры, п.9) */
.ok-inline-input {
  width: 44px; border: 0; border-bottom: 1px solid var(--ink);
  background: transparent; color: #0087FC; font-size: 21px; font-weight: 300;
  text-align: center; outline: none; font-family: 'Roboto', sans-serif;
}

/* Email-поле с подсказками доменов (п.10) */
.ok-email-wrap { position: relative; display: inline-block; min-width: 200px; }
.ok-email-input {
  border: 0; border-bottom: 1px solid var(--ink); background: transparent;
  color: #0087FC; font-size: 21px; font-weight: 300; outline: none;
  font-family: 'Roboto', sans-serif; padding: 2px 4px; min-width: 180px;
}
.ok-suggest {
  position: absolute; left: 0; top: 100%; z-index: 30; margin-top: 2px;
  min-width: 220px; max-height: 260px; overflow-y: auto;
  background: #FFFFFF; border: 1px solid #FFDD00; border-radius: 4px;
  box-shadow: 0 6px 18px rgba(98,86,14,.16); display: none;
}
.ok-suggest.open { display: block; }
.ok-suggest-item { padding: 8px 14px; font-size: 19px; color: var(--ink); cursor: pointer; }
.ok-suggest-item:hover, .ok-suggest-item.active { background: #FFF7CC; }

/* Чекбоксы (Figma чекбокс/Default 22x22) */
.ok-check { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.ok-check input { position: absolute; opacity: 0; pointer-events: none; }
.ok-check-box {
  width: 22px; height: 22px; border: 1px solid var(--ink); border-radius: 3px;
  background: #FFFFFF; flex-shrink: 0; position: relative; transition: background .12s;
}
.ok-check input:checked + .ok-check-box { background: var(--gold); }
.ok-check input:checked + .ok-check-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ok-check input:focus-visible + .ok-check-box { outline: 2px solid #0087FC; outline-offset: 1px; }

/* «Обзор» — выбор xlsx (п.11) */
.ok-browse-row { display: flex; align-items: stretch; gap: 10px; }
.ok-filepath {
  position: relative; flex: 1 1 auto; max-width: 522px; height: 50px;
  border: 1px solid #FFDD00; border-radius: 4px; background: #FFFFFF;
  display: flex; align-items: center; padding: 0 44px 0 16px;
}
.ok-filepath-text {
  color: var(--ink); font-size: 21px; font-weight: 300; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ok-filepath-text.placeholder { color: #C6C6C6; }
.ok-browse-btn {
  width: 97px; height: 50px; flex-shrink: 0; border: 1px solid #FFDD00;
  border-radius: 4px; background: var(--gold); color: var(--ink);
  font-size: 21px; font-weight: 300; cursor: pointer; transition: filter .15s;
}
.ok-browse-btn:hover { filter: brightness(.96); }

/* Крестик очистки в поле пути — «дорогой» цвет (п.12) */
.ok-fp-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; background: none; cursor: pointer;
  display: none; align-items: center; justify-content: center; padding: 0;
}
.ok-filepath.has-value .ok-fp-clear { display: inline-flex; }
.ok-fp-clear::before, .ok-fp-clear::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px;
  background: #87750E; border-radius: 2px; transition: background .15s;
}
.ok-fp-clear::before { transform: translate(-50%,-50%) rotate(45deg); }
.ok-fp-clear::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.ok-fp-clear:hover::before, .ok-fp-clear:hover::after { background: #B29802; }

/* Скрепка + «Количество вакансий ХХ» (п.13) */
.ok-clip-block { display: flex; align-items: center; gap: 16px; }
.ok-clip-btn {
  width: 22px; height: 28px; border: 0; background: none; cursor: pointer; padding: 0;
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease;
}
.ok-clip-btn svg { width: 100%; height: 100%; fill: currentColor; }
.ok-clip-btn:hover { color: #E23B3B; }   /* скрепка краснеет при наведении */
.ok-vac-count { color: var(--ink); font-size: 21px; font-weight: 300; }
.ok-clip-clear {
  width: 24px; height: 24px; border: 0; background: none; cursor: pointer; position: relative;
}
.ok-clip-clear::before, .ok-clip-clear::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px;
  background: #B29802; border-radius: 2px;
}
.ok-clip-clear::before { transform: translate(-50%,-50%) rotate(45deg); }
.ok-clip-clear::after  { transform: translate(-50%,-50%) rotate(-45deg); }

/* =========================================================================
   ПОПАП «Добавить / Редактировать группу в ОК» (Figma 1003x712, 1:1)
   ========================================================================= */
.ok-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(40,36,8,.28);
  display: flex; align-items: center; justify-content: center;
}
.ok-overlay[hidden] { display: none; }

.ok-popup {
  position: relative; width: 1003px; height: 712px;
  background: #FFFFFF; border: 1px solid #FDF3E6; border-radius: 6px;
  box-shadow: 0 18px 50px rgba(40,36,8,.30);
  box-sizing: border-box;
}
.ok-popup-title {
  position: absolute; left: 39px; top: 22px;
  font-size: 26px; font-weight: 400; color: #000;
}
.ok-popup-close {
  position: absolute; left: 945px; top: 16px; width: 30px; height: 30px;
  border: 0; background: none; cursor: pointer; padding: 0;
}
.ok-x { position: absolute; inset: 0; }
.ok-x::before, .ok-x::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px;
  background: #0F0F0F; border-radius: 2px;
}
.ok-x::before { transform: translate(-50%,-50%) rotate(45deg); }
.ok-x::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.ok-popup-close:hover .ok-x::before, .ok-popup-close:hover .ok-x::after { background: #E23B3B; }

/* Кремовая панель */
.ok-popup-body {
  position: absolute; left: 34px; top: 77px; width: 936px; height: 537px;
  background: #FFFDF0; border-radius: 4px; box-sizing: border-box;
}

/* Предупреждение */
.ok-warning { position: absolute; left: 69px; top: 89px; display: flex; align-items: center; gap: 12px; }
.ok-warning-ico { width: 22px; height: 30px; flex-shrink: 0;
  background: no-repeat center/contain;
  -webkit-mask: no-repeat center/contain; mask: no-repeat center/contain; }
.ok-warning-ico { background: #FFDD00;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M11 0a3 3 0 0 1 3 3v15a3 3 0 0 1-6 0V3a3 3 0 0 1 3-3zm0 24a3 3 0 1 1 0 6 3 3 0 0 1 0-6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M11 0a3 3 0 0 1 3 3v15a3 3 0 0 1-6 0V3a3 3 0 0 1 3-3zm0 24a3 3 0 1 1 0 6 3 3 0 0 1 0-6z'/%3E%3C/svg%3E"); }
.ok-warning-text { font-size: 21.6px; font-weight: 300; color: #000; }
.ok-popup.valid .ok-warning { visibility: hidden; }

/* Форма: поля с координатами как в Figma */
.ok-form { position: absolute; left: 0; top: 0; width: 100%; }
.ok-field {
  position: absolute; left: 66px; width: 873px; height: 55px;
  background: #FFFFFF; border: .5px solid #FFDD00; border-radius: 4px; box-sizing: border-box;
}
.ok-field[data-key="link"]    { top: 135px; }
.ok-field[data-key="addname"] { top: 201px; }
.ok-field[data-key="gid"]     { top: 267px; }
.ok-field[data-key="appid"]   { top: 333px; }
.ok-field[data-key="pubkey"]  { top: 399px; }
.ok-field[data-key="login"]   { top: 465px; }
.ok-field[data-key="pass"]    { top: 531px; }

.ok-input {
  position: absolute; left: 19px; right: 60px; top: 0; height: 100%;
  border: 0; background: transparent; outline: none;
  font-family: 'Roboto', sans-serif; font-weight: 300; font-size: 21.6px; color: #62560E;
  /* значение в нижней части поля, под уехавшим лейблом (Figma: value ~y30 в поле 55px) */
  padding: 24px 0 4px 0; box-sizing: border-box;
}
/* пустое поле: значение по центру (нет лейбла сверху) */
.ok-field:not(.filled):not(.focused) .ok-input { padding: 0; }
.ok-label {
  position: absolute; left: 19px; top: 50%; transform: translateY(-50%);
  font-weight: 300; font-size: 22px; color: #C6C6C6; line-height: 1;
  pointer-events: none;
  transition: top .14s ease, font-size .14s ease, transform .14s ease, color .14s ease;
}
.ok-field.filled .ok-label,
.ok-input:focus + .ok-label {
  top: 9px; transform: none; font-size: 18px; color: #807F7F;
}

/* Крестик очистки поля попапа (#B29802) */
.ok-clear {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: none; cursor: pointer;
  display: none; padding: 0;
}
.ok-field.filled .ok-clear { display: inline-block; }
.ok-clear::before, .ok-clear::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2.2px;
  background: #B29802; border-radius: 2px; transition: background .15s;
}
.ok-clear::before { transform: translate(-50%,-50%) rotate(45deg); }
.ok-clear::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.ok-clear:hover::before, .ok-clear:hover::after { background: #87750E; }

/* Подсказка «Очистить поле» (#E3E0E0, 189x40) */
.ok-tip {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  height: 40px; padding: 0 16px; display: none; align-items: center;
  background: #E3E0E0; border-radius: 4px; color: #000;
  font-size: 21.6px; font-weight: 300; white-space: nowrap; pointer-events: none;
}
.ok-field.filled .ok-clear:hover ~ .ok-tip { display: inline-flex; }

/* Кнопки попапа (Группа 353 @ 350,640) */
.ok-popup-actions { position: absolute; left: 350px; top: 640px; display: flex; gap: 19px; }
.ok-btn {
  width: 142px; height: 50px; border-radius: 4px; cursor: pointer;
  font-family: 'Roboto', sans-serif; font-weight: 300; font-size: 21.6px; border: .5px solid transparent;
  transition: filter .15s ease, opacity .15s ease;
}
.ok-btn-primary { background: #FFDD00; color: #62560E; }
.ok-btn-primary:hover { filter: brightness(.96); }
.ok-btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.ok-btn-cancel { background: #F2F2F2; border-color: #F2F2F2; color: #4D4343; }
.ok-btn-cancel:hover { filter: brightness(.97); }
