/* Scoped polish for the Google-auth based /band room flow. */

.band-google-shell {
  padding-top: max(0.9rem, calc(env(safe-area-inset-top) + 0.55rem));
}

.band-google-shell .hero {
  display: none;
}

.band-google-shell:not(.band-hub-shell):not(.band-room-shell) .primary-home-card h2 {
  display: none;
}

.band-google-shell:not(.band-hub-shell):not(.band-room-shell) .primary-home-card .subtle {
  margin-top: 0.46rem;
}

.band-google-shell input,
.band-google-shell select {
  border-color: #d9d0c4;
  background: rgba(255, 255, 255, 0.84);
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.band-google-shell input:focus,
.band-google-shell input:focus-visible,
.band-google-shell select:focus,
.band-google-shell select:focus-visible {
  border-color: #8aa89b;
  outline: none;
  box-shadow: 0 0 0 2px rgba(138, 168, 155, 0.22);
}

.band-account-card .card-header {
  align-items: center;
}

.band-hub-shell {
  display: grid;
  grid-template-columns: 1fr;
}

.band-hub-shell .compact-account-card .card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.62rem;
}

.band-hub-shell .compact-account-card .section-kicker,
.band-hub-shell .compact-account-card h2,
.band-hub-shell .band-room-list-card .card-header,
.band-hub-shell .band-room-list-card .card-header h2 {
  display: none;
}

.band-hub-shell .compact-account-card .subtle {
  margin-top: 0;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.2;
}

.band-hub-shell .compact-account-card .home-button {
  width: auto;
  min-width: auto;
  min-height: 30px;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
}

.band-hub-shell .band-room-list-card {
  grid-row: 2;
  grid-column: 1;
  padding-top: 0.9rem;
}

.compact-account-card,
.band-room-list-card,
.compact-room-hero-card,
.band-panel-card {
  box-shadow: 0 10px 26px rgba(92, 74, 43, 0.06);
}

.band-room-list {
  display: grid;
  gap: 0.62rem;
}

.band-room-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.82rem;
  border: 1px solid rgba(231, 221, 208, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.band-room-item strong {
  display: block;
  color: #3d342a;
  font-size: 0.98rem;
}

.band-room-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.band-room-item button {
  width: auto;
  min-width: auto;
  min-height: 34px;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.band-hub-actions {
  grid-row: 2;
  grid-column: 1;
  z-index: 3;
  justify-self: end;
  align-self: start;
  display: flex;
  gap: 0.34rem;
  width: auto;
  margin: -0.14rem 0.92rem 0 0;
}

.band-hub-actions button {
  width: auto;
  min-width: auto;
  min-height: 30px;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.band-hub-actions button:last-child {
  display: none;
}

.band-room-actions,
.compact-room-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.band-room-actions button,
.compact-room-actions button {
  width: 100%;
  min-height: 38px;
  padding: 0.48rem 0.55rem;
  border-radius: 13px;
  font-size: 0.86rem;
}

.compact-room-top {
  align-items: center;
}

.compact-room-top .pill {
  align-self: flex-start;
}

.compact-room-meta-grid {
  margin-top: 0.72rem;
}

.compact-room-meta-grid .meta-card {
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
}

.compact-room-meta-grid .meta-card strong {
  font-size: 1.24rem;
}

.band-tabbar {
  position: sticky;
  top: 0.35rem;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.34rem;
  margin-bottom: 0.72rem;
  border: 1px solid rgba(231, 221, 208, 0.86);
  border-radius: 18px;
  background: rgba(249, 243, 235, 0.92);
  backdrop-filter: blur(14px);
}

.band-tab-button {
  min-height: 38px;
  padding: 0.48rem 0.3rem;
  border-radius: 14px;
  background: transparent;
  color: #6b6258;
  font-size: 0.86rem;
  font-weight: 650;
}

.band-tab-button.active {
  background: #1f6f5f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(31, 111, 95, 0.14);
}

.band-google-shell .time-row-fragment {
  display: contents;
}

.band-compact-section-head {
  align-items: center;
}

.band-availability-toolbar {
  align-items: flex-start;
  gap: 0.7rem;
}

.band-availability-toolbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  width: auto;
}

.band-toolbar-controls {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.band-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.band-toolbar-row.top-row {
  flex-wrap: nowrap;
}

.band-week-selects {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  align-items: center;
  gap: 0.42rem;
  width: min(100%, 248px);
}

.band-week-selects select {
  width: 100%;
  min-height: 34px;
  padding: 0.36rem 1.72rem 0.36rem 0.72rem;
  border: 1px solid rgba(223, 211, 197, 0.96);
  border-radius: 999px;
  background-color: #f4ede3;
  background-image:
    linear-gradient(45deg, transparent 50%, #8b7a66 50%),
    linear-gradient(135deg, #8b7a66 50%, transparent 50%);
  background-position:
    calc(100% - 13px) 50%,
    calc(100% - 8px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: #5f5144;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}

.band-week-nav-pill {
  display: inline-flex;
  align-items: center;
  background: #fdfcfb;
  border: 1px solid rgba(223, 211, 197, 0.96);
  border-radius: 999px;
  min-height: 38px;
  padding: 0 0.2rem;
}

.band-week-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 1.1rem;
  background: transparent;
  color: #6b5c4c;
  border: none;
  cursor: pointer;
  padding: 0;
}

.band-week-nav-button:hover {
  background: rgba(0, 0, 0, 0.04);
}

.band-week-range {
  color: #6d5f51;
  font-size: 0.74rem;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
  padding: 0 0.3rem;
}

.band-hours-toggle {
  min-height: 38px;
  padding: 0.42rem 0.78rem;
  border: 1px solid rgba(223, 211, 197, 0.96);
  border-radius: 999px;
  background: #f4ede3;
  color: #6b5c4c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}

.band-hours-toggle.active {
  background: #1f6f5f;
  border-color: #1f6f5f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(31, 111, 95, 0.14);
}

.band-day-group-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.36rem;
}

.band-day-group-button {
  min-height: 38px;
  padding: 0.42rem 0.82rem;
  border: 1px solid rgba(223, 211, 197, 0.96);
  border-radius: 999px;
  background: #f4ede3;
  color: #6b5c4c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.band-day-group-button.active {
  background: #1f6f5f;
  border-color: #1f6f5f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(31, 111, 95, 0.14);
}

.band-availability-groups {
  display: grid;
  gap: 0.9rem;
}

.band-availability-group {
  display: grid;
  gap: 0.58rem;
}

.band-availability-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.7rem;
}

.band-availability-group-head h3,
.band-availability-group-head .subtle {
  margin: 0;
}

.band-availability-group-head h3 {
  font-size: 0.92rem;
  color: #5b4a35;
}

.band-availability-grid-wrap {
  overflow-x: auto;
  padding-bottom: 0.16rem;
}

.band-availability-grid {
  gap: 0.36rem;
  min-width: max-content;
}

.band-availability-grid .grid-top-left,
.band-availability-grid .day-label,
.band-availability-grid .time-label,
.band-availability-grid .slot-button {
  min-height: 40px;
  border-radius: 12px;
}

.band-availability-group.is-weekday-group .band-availability-grid {
  grid-template-columns: 52px repeat(5, minmax(44px, 1fr));
  width: 100%;
  min-width: 0;
}

.band-availability-group.is-weekend-group .band-availability-grid {
  grid-template-columns: 52px repeat(2, minmax(72px, 88px));
  width: fit-content;
}

.band-availability-grid .grid-top-left {
  min-width: 52px;
  background: #f7f0e6;
  color: #7b6f63;
  font-size: 0.76rem;
  font-weight: 700;
}

.band-availability-grid .time-label {
  min-width: 52px;
  font-size: 0.74rem;
}

.band-availability-grid .day-label {
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: center;
}

.band-availability-grid .slot-button {
  min-width: 44px;
  font-size: 0.95rem;
  font-weight: 700;
}

.band-panel-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.band-panel-actions button {
  min-height: 42px;
  margin-top: 0;
}

.band-day-actions-detail {
  margin-top: 0.8rem;
  border: 1px solid rgba(231, 221, 208, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  overflow: hidden;
}

.band-day-actions-detail summary {
  padding: 0.78rem 0.84rem;
  color: #5b4a35;
  font-weight: 700;
  cursor: pointer;
}

.compact-day-actions-grid {
  padding: 0 0.72rem 0.78rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-day-actions-grid .day-action-card {
  padding: 0.6rem;
}

.compact-day-actions-grid .mini-actions {
  grid-template-columns: 1fr 1fr;
}

.compact-day-actions-grid .ghost-button {
  min-height: 34px;
  padding: 0.35rem 0.45rem;
}

.compact-result-group + .compact-result-group {
  margin-top: 1.05rem;
}

.result-date-label {
  font-size: 11.5px;
  color: rgba(60, 50, 40, 0.55);
  margin: 1px 0 4px !important;
  line-height: 1.2;
}

.compact-result-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.76rem 0.82rem;
}

.compact-result-info {
  flex: 1;
  min-width: 0;
}

.compact-result-row .result-names {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-result-count {
  flex-shrink: 0;
  margin-top: 0 !important;
}

.recommendation-kicker + .compact-result-group,
.recommendation-kicker + .compact-member-list {
  margin-top: 0.7rem;
}

.recommendation-toggle-container {
  margin-top: 1.05rem;
}

.recommendation-expanded-content {
  margin-top: 0.6rem;
}

.compact-member-list {
  grid-template-columns: 1fr;
}

.band-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(31, 24, 17, 0.28);
  backdrop-filter: blur(10px);
}

.band-modal-sheet {
  width: min(100%, 560px);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  padding: 0.8rem 0.9rem max(1rem, env(safe-area-inset-bottom));
  border-radius: 28px 28px 20px 20px;
  background: rgba(255, 252, 248, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 70px rgba(55, 39, 24, 0.2);
}

.band-modal-handle {
  width: 44px;
  height: 4px;
  margin: 0.1rem auto 0.78rem;
  border-radius: 999px;
  background: #d5c9ba;
}

.band-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.band-modal-head h2 {
  margin: 0.24rem 0 0;
  font-size: 1.16rem;
  line-height: 1.2;
}

.band-modal-close {
  width: auto;
  min-height: 34px;
  padding: 0.42rem 0.7rem;
  border-radius: 12px;
  font-size: 0.82rem;
}

.band-manage-stack,
.band-modal-section {
  display: grid;
  gap: 0.74rem;
}

.band-modal-section {
  padding: 0.8rem;
  border: 1px solid rgba(231, 221, 208, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.compact-danger-block {
  padding: 0.8rem;
}

.compact-danger-block .danger-button {
  margin-top: 0.1rem;
}

@media (max-width: 699px) {
  .band-google-shell {
    padding-inline: 0.86rem;
    padding-bottom: max(3.8rem, calc(env(safe-area-inset-bottom) + 2.2rem));
  }

  .band-google-shell .card {
    padding: 0.94rem 0.92rem 1rem;
    margin-bottom: 0.78rem;
    border-radius: 22px;
  }

  .band-hub-shell .compact-account-card {
    padding-block: 0.52rem;
    min-height: auto;
  }

  .band-hub-shell .band-room-list-card {
    padding-block: 0.86rem;
    padding-top: 0.95rem;
  }

  .band-google-shell .card > * + * {
    margin-top: 0.68rem;
  }

  .band-google-shell .card > .card-header + * {
    margin-top: 0.52rem;
  }

  .band-google-shell .section-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .band-google-shell .card h2 {
    font-size: 1.08rem;
  }

  .band-google-shell input {
    min-height: 44px;
    padding: 0.64rem 0.82rem;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.2;
  }

  .band-google-shell input::placeholder {
    font-size: 16px;
  }

  .band-google-shell .card > button,
  .band-google-shell .inline-form button,
  .band-google-shell .stack-form button {
    min-height: 44px;
    padding: 0.64rem 0.86rem;
    border-radius: 14px;
    font-size: 0.96rem;
    font-weight: 650;
    line-height: 1.15;
  }

  .band-google-shell .field-grid {
    gap: 0.56rem;
  }

  .band-two-field-grid {
    grid-template-columns: 1fr;
  }

  .band-hub-shell .band-room-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .band-hub-shell .band-room-item button {
    width: auto;
    justify-self: end;
    min-height: 34px;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    font-size: 0.82rem;
  }

  .band-account-card .card-header,
  .band-hub-shell .compact-account-card .card-header {
    align-items: center;
  }

  .band-hub-shell .compact-account-card .home-button {
    justify-self: end;
  }

  .band-room-shell {
    padding-top: max(0.7rem, calc(env(safe-area-inset-top) + 0.35rem));
  }

  .compact-room-top {
    gap: 0.6rem;
  }

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

  .band-availability-toolbar-actions {
    align-items: stretch;
  }

  .band-availability-toolbar-actions .save-state {
    align-self: flex-start;
  }

  .band-toolbar-row {
    justify-content: space-between;
    gap: 0.35rem;
  }

  .band-toolbar-row.top-row {
    justify-content: flex-start;
  }

  .band-week-selects {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    justify-content: flex-start;
    width: min(100%, 180px);
    gap: 0.3rem;
  }

  .band-week-selects select {
    min-height: 32px;
    padding: 0.28rem 1.4rem 0.28rem 0.52rem;
    font-size: 0.7rem;
    letter-spacing: -0.01em;
  }

  .band-day-group-switch {
    gap: 0.25rem;
    flex-wrap: nowrap;
  }

  .band-day-group-button {
    min-height: 32px;
    padding: 0.32rem 0.58rem;
    font-size: 0.74rem;
  }

  .band-hours-toggle {
    min-height: 32px;
    padding: 0.32rem 0.68rem;
    font-size: 0.74rem;
  }

  .band-week-nav-pill {
    min-height: 30px;
  }

  .band-week-nav-button {
    min-width: 26px;
    min-height: 26px;
    font-size: 0.9rem;
  }

  .band-week-range {
    font-size: 0.7rem;
  }

  .band-availability-grid-wrap {
    margin-inline: -0.2rem;
  }

  .band-availability-group.is-weekday-group .band-availability-grid {
    grid-template-columns: 48px repeat(5, minmax(40px, 1fr));
  }

  .band-availability-group.is-weekend-group .band-availability-grid {
    grid-template-columns: 48px repeat(2, minmax(68px, 82px));
  }

  .band-availability-grid .grid-top-left,
  .band-availability-grid .time-label {
    min-width: 48px;
    font-size: 0.7rem;
  }

  .band-availability-grid .day-label,
  .band-availability-grid .slot-button {
    min-height: 38px;
  }

  .compact-result-row {
    flex-direction: row !important;
    align-items: center !important;
  }
}
