/* "Przejdź do aplikacji" button and its sheet (app-picker.js). Source of truth: Pages/_shared/;
   copies in each site are refreshed by `python Tools/sync_shared.py`.
   Colours come from the site's own :root (--sheet, --text, --dim, --blue) with the shared
   microsite palette as fallback. A site may set --ap-btn-bg / --ap-btn-fg for its button. */

.app-go {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 14px; border-radius: 8px;
  background: var(--ap-btn-bg, #E24B4A); color: var(--ap-btn-fg, #fff);
  font: 700 14px/1.1 "Barlow", sans-serif; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.app-go:active { transform: scale(.98); filter: brightness(.9); }
/* Phones: the full label on two lines ("Przejdź do / aplikacji"), so it fits next to the brand
   and the page's own chips without cutting the words. */
@media (max-width: 419px) {
  .app-go { white-space: normal; text-align: center; max-width: 6.6em; padding: 0 10px; font-size: 13px; line-height: 1.15; }
}
.app-go:focus-visible { outline: 2px solid var(--blue, #76CDFF); outline-offset: 2px; }

html.ap-lock, html.ap-lock body { overflow: hidden; }

.ap-backdrop[hidden], .ap-sheet[hidden] { display: none !important; }
.ap-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(4, 8, 13, .62);
  opacity: 0; transition: opacity .2s ease;
}
.ap-backdrop.ap-shown { opacity: 1; }

.ap-sheet {
  position: fixed; z-index: 1001; left: 50%; bottom: 0;
  width: min(100%, 440px); box-sizing: border-box;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--sheet, #111923); color: var(--text, #F0F5FA);
  border: 1px solid rgba(118, 205, 255, .18); border-bottom: 0; border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  font-family: "Barlow", sans-serif;
  transform: translate(-50%, 110%);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ap-sheet.ap-shown { transform: translate(-50%, 0); }
.ap-sheet.ap-dragging { transition: none; }
/* Wider screens: a card a little above the bottom edge instead of a full-width sheet. */
@media (min-width: 720px) {
  .ap-sheet { bottom: 24px; border-bottom: 1px solid rgba(118, 205, 255, .18); border-radius: 18px; padding-bottom: 16px; }
  .ap-sheet:not(.ap-shown) { transform: translate(-50%, calc(100% + 32px)); }
}

.ap-grip { width: 40px; height: 4px; margin: 2px auto 6px; border-radius: 2px; background: rgba(240, 245, 250, .28); }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-title { margin: 0; font: 400 28px/1 "Bebas Neue", "Barlow", sans-serif; letter-spacing: .02em; color: var(--text, #F0F5FA); }
.ap-close {
  flex: none; width: 44px; height: 44px; margin-right: -10px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; color: var(--dim, rgba(240, 245, 250, .72));
  font: 400 20px/1 sans-serif; cursor: pointer;
}
.ap-close:focus-visible, .ap-option:focus-visible, .ap-more:focus-visible { outline: 2px solid var(--blue, #76CDFF); outline-offset: 2px; }

.ap-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.ap-option {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid rgba(118, 205, 255, .18);
  background: rgba(118, 205, 255, .05); color: var(--text, #F0F5FA); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ap-option:active { transform: scale(.985); background: rgba(118, 205, 255, .12); }
.ap-option.ap-own { border: 2px solid var(--blue, #76CDFF); background: rgba(118, 205, 255, .1); padding: 7px 13px; }
/* Store badges at 40px, the minimum height Apple allows; the web badge copies their shape. */
.ap-badge { flex: none; width: 136px; height: 40px; display: flex; align-items: center; }
.ap-badge-img { display: block; height: 40px; width: auto; }
.ap-badge-web {
  display: flex; align-items: center; gap: 6px; box-sizing: border-box; width: 135px; height: 40px; padding: 0 8px 0 6px;
  border: 1px solid #A6A6A6; border-radius: 6px; background: #000; color: #fff;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.ap-badge-web svg { flex: none; width: 28px; height: 28px; color: var(--blue, #76CDFF); }
.ap-badge-web > span { display: flex; flex-direction: column; min-width: 0; }
.ap-badge-web small { font-size: 9px; line-height: 1.1; }
.ap-badge-web b { font-size: 15px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.ap-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.ap-text b { font-size: 17px; font-weight: 700; line-height: 1.2; }
.ap-text small { font-size: 13px; color: var(--dim, rgba(240, 245, 250, .72)); line-height: 1.3; }
.ap-tag {
  padding: 2px 7px; border-radius: 6px;
  background: rgba(118, 205, 255, .16); color: var(--blue, #76CDFF);
  font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap;
}

.ap-more {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px;
  color: var(--blue, #76CDFF); font-size: 15px; font-weight: 600; text-decoration: none;
}
.ap-more::after { content: "→"; margin-left: 6px; }

@media (prefers-reduced-motion: reduce) {
  .ap-sheet, .ap-backdrop { transition: none; }
}
