/* DETBTNROLES-0811: усі кнопки Детейлора -> 3 види сайту deks.ua (план DETBTNPILL-0811, «так» Власника №2197).
   Основна (primary): 46px, без рамки, радіус 40, #ffae00 / #1d1d1b (DETBTNYELLOW-0811: темний текст на жовтому ≥4,5:1; білий лише на заливках ok/danger/info), Kelson 14px (15px від 768px) 700.
   Другорядна (secondary): 40px, рамка 2px #ffae00, радіус 40, Kelson 14px 400, фон #fff, текст #3c3c3b.
   Мала (small): 30px, рамка 1px #dee4e8, радіус 40, Kelson 13px 400, фон #fff, текст #3c3c3b.
   Роль кожному контролю ставить button-roles-0811.js (атрибут data-button-role); цей файл лише читає атрибути.
   Модифікатори: data-button-icon (лише піктограма: квадрат = висота ролі); data-button-shape=round (коло) | fab (плаваюча кругла:
   розмір і тло лишаються як були) | keep (плитка/посилання конструктора, акордеон: геометрія лишається, роль — для семантики);
   data-button-size=floor (цехова кнопка для пальця: висота не нижча за роль); data-button-tone=danger|ok|info|warn.
   Логіка, обробники й розмітка кнопок не змінюються. Світіння «Зберегти» (#74): на .pk-save box-shadow/outline/animation не задаємо й не скидаємо. */
@font-face{font-family:"Kelson Sans RU";font-style:normal;font-weight:400;font-display:swap;unicode-range:U+0020-007E,U+00A0-00FF,U+0400-04FF,U+2010-2027,U+2030-203A,U+20AC,U+20B4,U+2116;src:url(../fonts/KelsonSansRU-400.woff2) format("woff2")}
@font-face{font-family:"Kelson Sans RU";font-style:normal;font-weight:700;font-display:swap;unicode-range:U+0020-007E,U+00A0-00FF,U+0400-04FF,U+2010-2027,U+2030-203A,U+20AC,U+20B4,U+2116;src:url(../fonts/KelsonSansRU-700.woff2) format("woff2")}
/* DETBTNGLYPH-0811: знак «⭳» (U+2B73, підпис «Пакет ⭳») не має гліфа ні в Kelson, ні в системних шрифтах macOS/цехових ПК — показувався квадратом-заглушкою.
   Запасний шрифт на один знак (стрілка вниз до риски, 636 байт) іде в стеку відразу після Kelson. */
@font-face{font-family:"DetBtn Arrow 0811";font-style:normal;font-weight:400 700;font-display:swap;unicode-range:U+2B73;src:url(../fonts/DetBtnArrow-0811.woff) format("woff")}

/* display ставимо лише там, де контрол — не <button>; шар нижче display не чіпає (щоб не воскрешати сховане скриптами) */
a[data-button-role],span[data-button-role],div[data-button-role]{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
[data-button-role][hidden]{display:none}

/* Шар із !important перемагає !important теми цеху (tsekh-theme-2310.css) без нарощування :not(#_) і без інших !important поза цим шаром. */
@layer detbtn-roles {
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]) {
    box-sizing: border-box !important;
    border-style: solid !important;
    border-radius: 40px !important;
    font-family: "Kelson Sans RU", "DetBtn Arrow 0811", Gilroy, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    text-decoration: none !important;
    cursor: pointer !important;
  }
  /* кольорові тіні старих кнопок прибираємо (форма — пігулка з рамкою); кнопку «Зберегти» зі світінням (#74) не чіпаємо */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]):not(.pk-save) { box-shadow: none !important; }
  /* --- основна --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"] {
    height: 46px !important; min-height: 46px !important; max-height: none !important;
    padding: 0 22px !important; border-width: 0 !important; border-color: transparent !important;
    background-color: #ffae00 !important; background-image: none !important; color: #1d1d1b !important;
    font-size: 14px !important; font-weight: 700 !important;
  }
  @media (min-width: 768px) { [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"] { font-size: 15px !important; } }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) { background-color: #ff8a00 !important; color: #1d1d1b !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"]:active:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) { background-color: #e07800 !important; }
  /* --- другорядна --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"] {
    height: 40px !important; min-height: 40px !important; max-height: none !important;
    padding: 0 20px !important; border-width: 2px !important; border-color: #ffae00 !important;
    background-color: #fff !important; background-image: none !important; color: #3c3c3b !important;
    font-size: 14px !important; font-weight: 400 !important;
  }
  /* --- мала --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"] {
    height: 30px !important; min-height: 30px !important; max-height: none !important;
    padding: 0 12px !important; border-width: 1px !important; border-color: #dee4e8 !important;
    background-color: #fff !important; background-image: none !important; color: #3c3c3b !important;
    font-size: 13px !important; font-weight: 400 !important;
  }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis), [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis),
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"]:active:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis), [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"]:active:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) {
    background-color: #ffae00 !important; border-color: #ffae00 !important; color: #1f1b12 !important;
  }
  /* вибраний / поточний стан (крок наряду, вкладка, перемикач) */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][aria-current="page"], [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][aria-pressed="true"],
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"].router-link-exact-active, [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"].active, [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"].on,
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][aria-pressed="true"], [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"].active, [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"].on {
    background-color: #ffae00 !important; border-color: #ffae00 !important; color: #1f1b12 !important; font-weight: 700 !important;
  }
  /* --- лише піктограма: ширина = висота ролі --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-icon][data-button-role="small"] { width: 30px !important; min-width: 30px !important; flex: 0 0 30px !important; padding: 0 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-icon][data-button-role="secondary"] { width: 40px !important; min-width: 40px !important; flex: 0 0 40px !important; padding: 0 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-icon][data-button-role="primary"] { width: 46px !important; min-width: 46px !important; flex: 0 0 46px !important; padding: 0 !important; }
  /* --- коло --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-shape="round"] { border-radius: 50% !important; padding: 0 !important; width: 40px !important; min-width: 40px !important; flex: 0 0 40px !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-shape="round"][data-button-role="small"] { width: 30px !important; min-width: 30px !important; flex-basis: 30px !important; }
  /* --- цехова кнопка для пальця: висота не нижча за роль --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-size="floor"][data-button-role="primary"] { height: auto !important; min-height: 56px !important; font-size: 18px !important; }
  /* DETBTNFIX-0811: довгий підпис кнопки для пальця переноситься на 2 рядки й не виходить за вікно (було: «Віддати назад» до x=466 на 390) */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-size="floor"] { white-space: normal !important; padding: 6px 14px !important; line-height: 1.15 !important; text-align: center !important; max-width: 100% !important; min-width: 0 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-size="floor"][data-button-role="secondary"] { height: auto !important; min-height: 52px !important; font-size: 16px !important; }
  /* --- відтінки значення дії (сенс не втрачаємо): заливка в основної, рамка й текст у решти --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"][data-button-tone="danger"] { background-color: #c8402c !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"][data-button-tone="danger"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) { background-color: #a83422 !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"][data-button-tone="ok"] { background-color: #17794a !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"][data-button-tone="ok"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) { background-color: #125f38 !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"][data-button-tone="info"] { background-color: #1c5aa8 !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="primary"][data-button-tone="info"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) { background-color: #164683 !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][data-button-tone="danger"], [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-tone="danger"] { border-color: #e2503a !important; color: #b23a26 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][data-button-tone="ok"], [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-tone="ok"] { border-color: #1f9254 !important; color: #187343 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][data-button-tone="info"], [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-tone="info"] { border-color: #1c5aa8 !important; color: #1c5aa8 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][data-button-tone="warn"], [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-tone="warn"] { border-color: #f0d38a !important; color: #8a5f00 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="secondary"][data-button-tone]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis), [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-tone]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.stepper__link--disabled):not(.b-dis) { color: #1f1b12 !important; }
  /* DETBTNFIX-0811: головна дія рядка таблиці (data-button-main) — суцільна заливка своїм кольором і жирний підпис, висота мала (30) лишається;
     допоміжні дії рядка лишаються з рамкою на білому */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main] { color: #fff !important; font-weight: 700 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main][data-button-tone="danger"] { background-color: #c8402c !important; border-color: #c8402c !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main][data-button-tone="ok"] { background-color: #17794a !important; border-color: #17794a !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main][data-button-tone="info"] { background-color: #1c5aa8 !important; border-color: #1c5aa8 !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main][data-button-tone="danger"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.b-dis) { background-color: #a83422 !important; border-color: #a83422 !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main][data-button-tone="ok"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.b-dis) { background-color: #125f38 !important; border-color: #125f38 !important; color: #fff !important; }
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[data-button-role="small"][data-button-main][data-button-tone="info"]:hover:not(:disabled):not([aria-disabled="true"]):not(.is-disabled):not(.b-dis) { background-color: #164683 !important; border-color: #164683 !important; color: #fff !important; }
  /* --- недоступна: видно, що недоступна, не лише кольором --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]):disabled,
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[aria-disabled="true"],
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]).is-disabled,
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]).stepper__link--disabled,
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]).stepper__aux-link--disabled,
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"]).b-dis { opacity: .45 !important; cursor: not-allowed !important; filter: grayscale(.4) !important; }
  /* --- очікування --- */
  [data-button-role]:not([data-button-shape="keep"]):not([data-button-shape="fab"])[aria-busy="true"] { cursor: progress !important; opacity: .7 !important; }
}
/* Клавіатурний фокус — поза шаром. Кнопку «Зберегти» (#74) не чіпаємо: її кільце задає pick-hint. */
[data-button-role]:focus-visible:not(.pk-save) { outline: 2px solid #3c3c3b; outline-offset: 2px; }
