/* IT DigiSkill installable web app (PWA): install button, install card, install steps,
   offline notice. Loaded on every page by App\Helpers\Pwa::head(). */

[data-pwa-install][hidden] { display: none !important; }

/* Public website: in the collapsed menu below 1200 px, in the dark top strip from 1200 px
   (the menu row has no room left there, and the Login button must stay on one line). */
.itds-pwa-nav-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; white-space: nowrap; cursor: pointer; }
.itds-pwa-strip-btn { display: none; align-items: center; gap: 5px; background: none; border: 0; padding: 0 0 0 16px; color: #fff; font: inherit; font-size: .875rem; white-space: nowrap; cursor: pointer; }
.itds-pwa-strip-btn:hover { color: #ff9a3d; }
@media (min-width: 1200px) {
  .itds-pwa-nav-item { display: none !important; }
  .itds-pwa-strip-btn:not([hidden]) { display: inline-flex; }
}
.itds-pwa-top-btn { white-space: nowrap; }

/* Sign-in pages (dark card). */
.itds-pwa-auth { margin: 16px 0 0; text-align: center; }
.itds-pwa-auth button { width: auto; background: none; border: 1px solid #24476b; color: #c9d6e3; border-radius: 6px; padding: 8px 14px; min-height: 40px; font: inherit; font-size: .85rem; cursor: pointer; }
.itds-pwa-auth button:hover { border-color: #ff7a00; color: #fff; }

/* Install card: public website only, bottom of the screen, never covers the whole page. */
.itds-pwa-card {
  position: fixed; z-index: 1080; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 460px; margin: 0 auto; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  background: #fff; color: #23313f; border: 1px solid #e4e9ef; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(13, 27, 42, .18); padding: 12px 14px;
  font-family: inherit;
}
.itds-pwa-card img { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; }
.itds-pwa-card-text { flex: 1 1 180px; min-width: 0; font-size: .88rem; line-height: 1.35; }
.itds-pwa-card-text strong { display: block; color: #0d1b2a; font-size: .95rem; }
.itds-pwa-card-actions { display: flex; gap: 8px; margin-left: auto; }

.itds-pwa-btn { width: auto; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.itds-pwa-btn-primary { background: #ff7a00; border-color: #ff7a00; color: #fff; }
.itds-pwa-btn-primary:hover { background: #e56d00; border-color: #e56d00; }
.itds-pwa-btn-link { background: transparent; color: #41566c; }
.itds-pwa-btn-link:hover { color: #0d1b2a; text-decoration: underline; }
.itds-pwa-btn:focus-visible, .itds-pwa-nav-btn:focus-visible, .itds-pwa-top-btn:focus-visible, .itds-pwa-auth button:focus-visible, .itds-pwa-strip-btn:focus-visible {
  outline: 3px solid #1b6ef3; outline-offset: 2px;
}

/* iPhone / iPad / Mac steps. */
.itds-pwa-dialog {
  border: 0; border-radius: 14px; padding: 20px; box-sizing: border-box;
  width: calc(100vw - 32px); max-width: 440px; color: #23313f; background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3); font-family: inherit;
}
.itds-pwa-dialog::backdrop { background: rgba(13, 27, 42, .55); }
.itds-pwa-dialog h2 { font-size: 1.15rem; margin: 0 0 10px; color: #0d1b2a; }
.itds-pwa-dialog ol { padding-left: 20px; margin: 0 0 12px; }
.itds-pwa-dialog li { margin-bottom: 6px; line-height: 1.45; }
.itds-pwa-note { font-size: .85rem; color: #5b6b7d; margin: 0 0 14px; }
.itds-pwa-dialog-fallback { position: fixed; z-index: 1100; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Tables on phones: they scroll sideways inside their own box (pwa.js puts a box around
   tables that have none) and keep whole words, instead of squeezing every column until
   the text breaks letter by letter. */
.itds-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive td, .table-responsive th, .itds-table-scroll td, .itds-table-scroll th { overflow-wrap: normal; word-break: normal; }

/* Offline notice. */
.itds-offline-bar {
  position: fixed; z-index: 1090; left: 0; right: 0; top: 0;
  background: #8a1c1c; color: #fff; text-align: center; font-size: .9rem; line-height: 1.35;
  padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top, 0px));
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.itds-offline-bar[hidden] { display: none; }

@media print {
  .itds-pwa-card, .itds-offline-bar, .itds-pwa-dialog, [data-pwa-install] { display: none !important; }
}
