/* v41: selected-state contrast, schedule alignment and POS/receipt polish. */

/* Selected controls must remain legible on every glass surface. */
.portal-main :is(button.active, a.active, [role="tab"][aria-selected="true"]),
.cp-main :is(button.active, a.active, [role="tab"][aria-selected="true"]) {
  border-color: rgba(255, 255, 255, .28) !important;
  background: linear-gradient(135deg, #8d4263, #b85b81) !important;
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(54, 20, 36, .22);
}
.portal-main :is(button.active, a.active, [role="tab"][aria-selected="true"]) *,
.cp-main :is(button.active, a.active, [role="tab"][aria-selected="true"]) * {
  color: #fff !important;
}

/* Match the week selector to the three schedule summary cards below it. */
.portal-main .schedule-week-nav {
  width: 100%;
  max-width: none;
}

.sale-receipt-panel .pos-stripe {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(99, 65, 181, .28);
  background: linear-gradient(135deg, #6756b8, #7a67cf);
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(83, 67, 160, .2);
}
.sale-receipt-panel .pos-stripe:disabled {
  background: rgba(255, 255, 255, .5);
  color: #8a7d84 !important;
  box-shadow: none;
}

@media (max-width: 760px) {
  /* Give receipt titles and actions separate rows instead of competing for space. */
  .portal-main > header {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
  }
  .portal-main > header > div:first-of-type {
    grid-column: 2;
    width: 100%;
  }
  .portal-main > header > div:last-child:not(:empty) {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding-top: 4px;
  }
  .portal-main > header > div:last-child:not(:empty) > :only-child {
    grid-column: 1 / -1;
  }
  .portal-main > header > div:last-child:empty {
    display: none !important;
  }
  .portal-main > header > div:last-child > * {
    min-width: 0;
    width: 100%;
    padding-inline: 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }
  .portal-main > header h1 {
    overflow-wrap: anywhere;
  }
  .portal-main .receipt-card {
    margin-top: 8px;
  }
}

@media (max-width: 430px) {
  .portal-main > header > div:last-child:not(:empty) {
    grid-template-columns: 1fr;
  }
}
