/**
 * Card header toolbars (لیست خوابگاه‌ها، تاریخچه سفارشات، …)
 * were clipped by Vuetify's v-card-item grid (append = max-content)
 * with no overflow scroll — buttons looked cut off and were not clickable.
 */

.v-card > .v-card-item {
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  row-gap: 0.75rem;
}

.v-card > .v-card-item .v-card-item__content {
  min-width: 0;
}

.v-card > .v-card-item .v-card-item__append {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

/* Keep action clusters usable: wrap when possible, else scroll parent */
.v-card > .v-card-item .v-card-item__append > .d-flex {
  flex-wrap: wrap;
  max-width: 100%;
  row-gap: 0.5rem;
}

@media (max-width: 959px) {
  .v-card > .v-card-item {
    grid-template-areas:
      "prepend content"
      "append append";
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .v-card > .v-card-item .v-card-item__append {
    padding-inline-start: 0;
    width: 100%;
  }
}

