/* Layout adjustments requested for the current desktop dashboard. */

@media (min-width: 1200px) {
  /* Main catalogue: show four listings per row on large screens. */
  .results-layout #grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 761px) {
  /* Keep owner and cohost cards readable on medium screens. A 260px minimum
     naturally caps these full-width grids at four columns through 1200px. */
  #landlordView #ownerManagement,
  #landlordView .owner-property-grid,
  #landlordView .cohost-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
    gap: 16px !important;
    align-items: start !important;
  }

  #landlordView .owner-reservation-group:not([hidden]) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  #landlordView .owner-reservation-group:not([hidden]) > .owner-reservation-item {
    width: 100% !important;
    min-width: 0 !important;
    flex: initial !important;
  }

  /* Account reservations fill their panel and form a three-column grid. */
  #accountView #bookingList .booking-filter-bucket:not([hidden]) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 16px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  #accountView .tenant-reservation-item {
    width: 100% !important;
    min-width: 0 !important;
    flex: initial !important;
    scroll-snap-align: none !important;
  }
}

@media (min-width: 1201px) {
  /* Restore the six-column desktop layout on wide screens. */
  #landlordView #ownerManagement,
  #landlordView #cohostSection .cohost-cards,
  #landlordView .owner-property-grid,
  #landlordView .cohost-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
  #landlordView .owner-reservation-group:not([hidden]) {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

/* Coanfitriones reuses the exact Propiedades grid at every responsive width. */
@media (max-width: 760px) {
  #landlordView .owner-property-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  /* Keep the existing mobile card layout intact while removing carousel sizing. */
  #accountView #bookingList .booking-filter-bucket:not([hidden]) {
    width: 100% !important;
    margin-inline: 0 !important;
  }
}
