/* Service Worker update banner. Stacked on narrow screens, single row on wider
   ones (matches the app's own 480px breakpoint used elsewhere). JS toggles
   visibility via element.style.display ('flex' / 'none') — everything else
   (layout, colors, button sizing) lives here. */

#sw-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10002;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--primary-color);
  color: var(--on-primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.sw-update-banner-text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.sw-update-banner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  align-self: stretch;
}

.sw-update-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.sw-update-btn--later {
  background: transparent;
  border: 1.5px solid var(--on-primary-color);
  color: var(--on-primary-color);
}
.sw-update-btn--now {
  background: var(--on-primary-color);
  border: 1.5px solid var(--on-primary-color);
  color: var(--primary-color);
  font-weight: 600;
}

@media (min-width: 480px) {
  #sw-update-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .sw-update-banner-text {
    flex: 1 1 auto;
  }
  .sw-update-banner-actions {
    align-self: auto;
    flex-shrink: 0;
  }
}
