/* ЦОУ Kuzet — phone "app" layer shared by the home page and the blog:
 * bottom action bar, press feedback, safe areas. Desktop is untouched. */

a, button, summary, label, .day { -webkit-tap-highlight-color: transparent; }
a, button, .btn, summary, input, textarea { touch-action: manipulation; }

.appbar { display: none; }

/* cookie notice: a quiet card in the corner, above the phone bar */
.cookie {
  position: fixed; left: 24px; bottom: 24px; z-index: 95; width: min(440px, calc(100vw - 48px));
  padding: 20px 20px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px;
  background: rgba(14,16,16,.9); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  font-family: var(--font); color: #fff;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .4s, transform .5s cubic-bezier(.22, 1, .36, 1);
}
.cookie.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cookie p { margin: 0; font-size: 14px; line-height: 21px; font-weight: 300; color: #b9b9b9; }
.cookie__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cookie button {
  flex: 1 1 auto; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 500 14px/1 var(--font); transition: background .25s, color .25s, border-color .25s;
}
.cookie__all { border: 1px solid #fff; background: #fff; color: #000; }
.cookie__all:hover { background: var(--accent); border-color: var(--accent); }
.cookie__min { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; }
.cookie__min:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 1800px) { .cookie { zoom: 1.2; } }
@media (min-width: 2600px) { .cookie { zoom: 1.45; } }

@media (max-width: 1024px) {
  /* room for the bar under the last screen */
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

  .appbar {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 90;
    display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.35fr; gap: 4px; padding: 6px;
    border: 1px solid rgba(255,255,255,.1); border-radius: 22px;
    background: rgba(14,16,16,.82); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s;
  }
  .appbar.is-hidden { transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }
  .cookie { left: 10px; right: 10px; width: auto; max-width: 520px; bottom: calc(96px + env(safe-area-inset-bottom)); padding: 16px; }
  .cookie p { font-size: 13px; line-height: 19px; }
  .appbar a, .appbar button {
    display: grid; justify-items: center; align-content: center; gap: 4px; height: 56px; border-radius: 16px;
    font-size: 11px; line-height: 1; font-weight: 500; color: #cfcfcf;
    transition: background .25s, transform .2s;
  }
  .appbar [data-icon] { font-size: 22px; }
  .appbar [data-icon] { color: var(--accent); }
  /* contact button: call and WhatsApp take turns, a tap offers both */
  .appbar__swap { display: grid; justify-items: center; }
  .appbar__swap > * { grid-area: 1 / 1; animation: swapA 6s infinite; }
  .appbar__swap > :last-child { animation-name: swapB; }
  .appbar__swap--txt { font-size: 11px; }
  @keyframes swapA { 0%, 42% { opacity: 1; transform: none; } 50%, 92% { opacity: 0; transform: translateY(-4px); } 100% { opacity: 1; transform: none; } }
  @keyframes swapB { 0%, 42% { opacity: 0; transform: translateY(4px); } 50%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(4px); } }
  .appbar__contact[aria-expanded="true"] { background: rgba(var(--accent-rgb), .14); }

  /* bottom sheet: call or write */
  .appsheet { position: fixed; inset: 0; z-index: 89; /* under the bar, so "Меню" toggles it */ background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .appsheet[hidden] { display: none; }
  .appsheet__panel {
    position: absolute; left: 10px; right: 10px; bottom: calc(96px + env(safe-area-inset-bottom));
    padding: 10px 16px 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 24px;
    background: rgba(18,21,21,.97); box-shadow: 0 20px 50px rgba(0,0,0,.6);
    animation: sheetIn .4s cubic-bezier(.22, 1, .36, 1);
  }
  @keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } }
  .appsheet__grip { display: block; width: 40px; height: 4px; margin: 0 auto 8px; border-radius: 4px; background: #3a3a3a; }
  .appsheet__title { padding: 6px 4px 14px; font-size: 18px; font-weight: 500; color: #fff; }
  .appsheet__note { margin-top: 12px; text-align: center; font-size: 13px; color: #8d8d8d; }
  .appsheet__contacts { display: grid; gap: 8px; }
  .appsheet__contacts .btn { gap: 10px; height: 56px; border-radius: 16px; font-size: 16px; }
  .appsheet__contacts [data-icon] { font-size: 22px; }
  .appsheet__contacts .btn { width: 100%; }

  /* press feedback on touch screens */
  .btn, .appbar a, .seg button, .day, .counter__ctl button, .chips button, .faq__item summary, .header__contacts a { transition-property: background, color, border-color, transform, opacity; }
}
@media (hover: none) {
  .btn:active, .appbar a:active, .appbar button:active, .seg button:active, .day:active:not(:disabled), .counter__ctl button:active,
  .header__contacts a:active, .table__more:active, .field__map:active { transform: scale(.96); }
  .appbar a:active, .appbar button:active { background: rgba(255,255,255,.08); }
}
@media (prefers-reduced-motion: reduce) {
  .appbar__swap > * { animation: none; }
  .appbar__swap > :last-child { opacity: 0; }
}
