/* The buttons of the whole application, the same as INTECHI CRM (the owner's visual audit of both apps, 30. 11. 2026): the colour of the
   buttons that add and pause, one corner of the main buttons, the size of the icon buttons of the rows and the size for a finger.
   One file for one part of the application: a change of the buttons touches only this file. Values only from the tokens. */

/* every button that adds something (the + of the words or the picture) is green, across the application (CRM public/css/shared.css) */
html.sd .btn.secondary[data-act='add'],
html.sd .btn.secondary.bt-add,
html.sd a.btn.secondary[data-act='add'],
html.sd.sd .btn[data-act='add'],
html.sd.sd .btn.btn:has(> .fa-plus:first-child) {
  border: 1px solid var(--sd-action-green-line);
  background: var(--sd-action-green-bg);
  color: var(--sd-action-green-ink);
}
html.sd .btn.secondary[data-act='add']:hover,
html.sd .btn.secondary.bt-add:hover,
html.sd.sd .btn[data-act='add']:hover,
html.sd.sd .btn.btn:has(> .fa-plus:first-child):hover {
  background: var(--sd-action-green-hover);
  /* under the pointer the words stay green (the white of the blue main buttons made them vanish on the light green) */
  color: var(--sd-action-green-ink);
  border-color: var(--sd-action-green-line);
}
html.sd.sd .btn.btn:has(> .fa-plus:first-child) .btn-lead,
html.sd.sd .btn[data-act='add'] .btn-lead {
  color: inherit;
}

/* a button that switches off or pauses (Pozastavit samostatnou práci, Vypnout) is the solid burgundy of Vypnout (.btn-stop; the owner,
   27. 11. 2026, all apps; CRM public/css/shared.css) */
html.sd.sd .btn[data-act='pause']:not(.icon-only),
html.sd.sd .btn:has(> i.fa-pause):not(.icon-only),
html.sd.sd .btn:has(> i.fa-power-off):not(.icon-only) {
  background: var(--sd-color-red-800);
  border-color: var(--sd-color-red-800);
  color: #fff;
}
html.sd.sd .btn[data-act='pause']:not(.icon-only):hover,
html.sd.sd .btn:has(> i.fa-pause):not(.icon-only):hover,
html.sd.sd .btn:has(> i.fa-power-off):not(.icon-only):hover {
  filter: brightness(0.92);
}
html.sd.sd .btn[data-act='pause']:not(.icon-only) .btn-lead,
html.sd.sd .btn:has(> i.fa-pause):not(.icon-only) .btn-lead,
html.sd.sd .btn:has(> i.fa-power-off):not(.icon-only) .btn-lead {
  color: inherit;
}

/* one corner for every main button, a link or a button (CRM sd.css: the corner of 6 px of the submit of the Service Desk) */
html.sd a.btn:not(.secondary):not(.danger) {
  border-radius: var(--sd-field-r);
}

/* the icon buttons on a computer are squares as high as the text buttons of their size (public/sd.css: 30 px small, 34 px big; the owner,
   3. 12. 2026, the same as INTECHI CRM); a table made smaller to fit its card (public/js/fitwide.js, --fit-k) makes all its buttons higher
   by the same measure, so a row keeps one height on the screen too */
@media (min-width: 992px) and (pointer: fine) {
  html.sd table[data-fit] {
    --sd-btn-h: calc(34px / var(--fit-k, 1));
    --sd-btn-sm-h: calc(30px / var(--fit-k, 1));
  }
  html.sd table[data-fit] .btn.icon-only,
  html.sd table[data-fit] .btn.icon-only > i {
    font-size: calc(var(--sd-action-glyph) / var(--fit-k, 1));
  }  /* Náklady › Nahrané doklady: „Přiřadit firmě“ stands beside the picker of the firm, a field of 36 px (.acct-btn), at its height */
  html.sd .inbox-firm .btn.icon-only {
    --sd-btn-sm-h: var(--sd-ctl-h);
  }
}

/* Domů and Kalendář, the actions of a reminder (the e-mail field of 34 px, Kopie, the flag, Zobrazit, Urgovat, Odbavit in two forms of one
   row): all at the height of a text button (the owner, 3. 12. 2026: „tlačítka v jedné řadě stejně vysoká“) */
html.sd .reminder-actions {
  --sd-btn-sm-h: var(--sd-btn-h);
}

/* a phone and a finger: everything to tap is at least 44 px (the rule of the project; desktop unchanged) */
@media (max-width: 640px), (pointer: coarse) {
  html.sd {
    --sd-btn-h: 44px;
    --sd-btn-sm-h: 44px;
    --sd-action-size: 44px;
  }
  html.sd .cf-phone > summary.btn,
  html.sd .cf-btns .btn,
  html.sd .cf-pop .btn,
  html.sd .banner .btn {
    min-height: 44px;
  }
  /* the button that adds and „Filtrovat a řadit“ stay side by side in the card of a list (as CRM) */
  html.sd .toolbar > .adds .btn {
    padding-inline: 14px;
    min-height: 44px;
  }
}

/* the buttons of the orange demo bar: tinted buttons of the actions with their picture, never white (the owner, 30. 11. 2026) */
html.sd .banner.demo-strip .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* the words take the free room: the two buttons stand side by side on the right, not apart (the owner, 1. 12. 2026) */
html.sd .banner.demo-strip > span {
  flex: 1 1 auto;
}
