/* Compact presentation used only by the installed WCR web app. */
@media (display-mode: standalone) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .client-header {
    min-height: 54px;
    padding: 7px 12px;
  }

  /* Installed app only: the station app does not need the parent Wrexham Media logo. */
  .client-header > a {
    display: none !important;
  }

  .client-header > span {
    margin-inline: auto;
  }

  .wcr-app-notification-button {
    position: relative;
  }

  .wcr-app-notification-button b {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e30613;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(7, 25, 34, .24);
  }

  .wcr-app-notification-button.has-unread {
    border-color: #e30613;
    background: #fff5f5;
  }

  .client-header img {
    max-height: 34px;
  }

  .wcr-dashboard {
    padding: 15px 11px 32px;
  }

  .wcr-head {
    gap: 13px;
    padding-bottom: 15px;
  }

  .wcr-title {
    gap: 11px;
  }

  .wcr-title img {
    box-sizing: border-box;
    display: block;
    flex: 0 0 92px;
    width: 92px;
    height: 60px;
    max-width: 92px;
    max-height: 60px;
    border-radius: 9px;
    background: #071922;
    object-fit: contain !important;
    object-position: center;
    overflow: hidden;
    clip-path: inset(0 round 9px);
    padding: 8px !important;
  }

  .wcr-title h1 {
    font-size: clamp(25px, 8vw, 38px);
  }

  .wcr-title p {
    margin-top: 4px;
    font-size: 12px;
  }

  .wcr-head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .wcr-head-actions > a,
  .wcr-head-actions > button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 7px 8px !important;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .wcr-metrics {
    gap: 7px;
    margin: 13px 0;
  }

  .wcr-metrics article {
    padding: 12px;
    border-radius: 10px;
  }

  .wcr-metrics strong {
    margin-top: 3px;
    font-size: 25px;
  }

  .wcr-toolbar {
    gap: 9px;
    padding: 13px;
    border-radius: 12px;
  }

  .wcr-toolbar input,
  .wcr-toolbar select,
  .wcr-toolbar button {
    min-height: 42px;
    height: 42px;
  }

  .wcr-event-count-filters {
    margin: 10px 0;
    padding: 10px;
  }

  .wcr-member-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .wcr-member-card {
    border-radius: 11px;
  }

  .wcr-member-top {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
  }

  .wcr-photo {
    width: 66px;
    height: 78px;
    border-radius: 8px;
  }

  .wcr-member-card h3 {
    font-size: 18px;
  }

  .wcr-badges {
    gap: 5px;
    margin-top: 6px;
  }

  .wcr-content-bank {
    margin-top: 20px;
    padding: 14px 10px;
    border-radius: 13px;
  }

  .wcr-content-heading h2 {
    font-size: 30px;
  }

  .wcr-content-table {
    min-width: 0;
  }

  .wcr-content-table-head {
    display: none;
  }

  .wcr-content-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px 11px;
    min-height: 0;
    padding: 12px 10px;
  }

  .wcr-content-thumb {
    width: 62px;
    height: 52px;
  }

  .wcr-content-primary,
  .wcr-content-item > div:not(.wcr-content-thumb) {
    min-width: 0;
  }

  .wcr-content-item > div:nth-child(n + 3) {
    grid-column: 2;
  }

  .wcr-content-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wcr-collection-bar {
    gap: 10px;
    margin: 12px 0 9px;
    padding: 11px;
  }

  .wcr-member-dialog {
    padding: 12px 10px 36px;
  }

  .wcr-detail-head {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .wcr-detail-head .wcr-photo {
    width: 72px;
    height: 88px;
  }

  .wcr-detail-head h2 {
    font-size: 27px;
  }

  .wcr-id-card-panel,
  .wcr-management-panel,
  .wcr-station-work,
  .wcr-attendance {
    margin: 14px 0;
    padding: 14px;
  }
}

@media (display-mode: standalone) {
  .wcr-app-notification-dialog {
    width: min(92vw, 560px);
    max-height: min(76vh, 720px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    color: #143443;
    box-shadow: 0 20px 70px rgba(4, 20, 29, .42);
  }

  .wcr-app-notification-dialog::backdrop {
    background: rgba(4, 20, 29, .65);
    backdrop-filter: blur(3px);
  }

  .wcr-app-notification-dialog header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-top: 6px solid #e30613;
    background: #071c27;
    color: #fff;
  }

  .wcr-app-notification-dialog header h2,
  .wcr-app-notification-dialog header p {
    margin: 0;
  }

  .wcr-app-notification-dialog header .kicker {
    color: #45d4e5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
  }

  .wcr-app-notification-dialog header > div > p:last-child {
    margin-top: 6px;
    color: #c9d9e0;
    font-size: 13px;
  }

  .wcr-app-notification-list {
    max-height: 58vh;
    overflow: auto;
    padding: 14px;
    background: #edf4f7;
  }

  .wcr-app-notification-list article {
    display: grid;
    gap: 4px;
    margin-bottom: 9px;
    padding: 14px 15px;
    border: 1px solid #d0dfe5;
    border-left: 4px solid #7a929d;
    border-radius: 10px;
    background: #fff;
  }

  .wcr-app-notification-list article.unread {
    border-left-color: #e30613;
    background: #fffafa;
  }

  .wcr-app-notification-list article span {
    color: #087f93;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .wcr-app-notification-list article strong {
    font-size: 15px;
  }

  .wcr-app-notification-list article time {
    color: #637b86;
    font-size: 12px;
  }
}

@media (display-mode: standalone) and (min-width: 700px) {
  .wcr-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wcr-head-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
