/* Mobile-only Anpassungen – Desktop bleibt unverändert */

/* Filter-Buttons: kurzer Text auf kleinen Screens */
.rf-filter-label-short {
  display: none;
}

@media (max-width: 767.98px) {
  .rf-filter-label-long {
    display: none;
  }

  .rf-filter-label-short {
    display: inline;
  }

  .public-filter-toggle {
    min-height: 44px !important;
    padding: 10px 14px !important;
    justify-content: center !important;
  }

  .public-filter-toggle-title {
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  .room-overview-filter-toggle {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 700;
  }
}

/* Listen: Spalten Adresse, Kapazität, Preis auf Mobile ausblenden */
@media (max-width: 767.98px) {
  .rf-list-hide-mobile,
  .admin-landlord-compact-table td[data-label="Adresse"],
  .admin-landlord-compact-table td.admin-landlord-cell-address,
  .account-compact-table td[data-label="Adresse"],
  .account-compact-table td.account-cell-address,
  .landlord-compact-table td[data-label="Adresse"],
  .rf-list-table td.rf-col-address,
  .rf-list-table td.rf-col-capacity,
  .rf-list-table td.rf-col-price,
  .rf-list-table td.rf-col-type {
    display: none !important;
  }

  .rf-list-table .rf-col-address-subline {
    display: none !important;
  }
}

/* Gestapelte Listenzeilen (mehrzeilig statt horizontal scroll) */
@media (max-width: 767.98px) {
  .rf-list-table-wrap,
  .room-compact-table-wrap,
  .landlord-compact-table-wrap {
    overflow: visible;
  }

  .rf-list-table,
  .room-compact-table,
  .landlord-compact-table {
    min-width: 0 !important;
    display: block;
  }

  .rf-list-table colgroup,
  .rf-list-table thead,
  .room-compact-table colgroup,
  .room-compact-table thead,
  .landlord-compact-table colgroup,
  .landlord-compact-table thead {
    display: none;
  }

  .rf-list-table tbody,
  .room-compact-table tbody,
  .landlord-compact-table tbody {
    display: block;
    padding: 0 12px;
  }

  .rf-list-table tbody tr,
  .room-compact-table tbody tr,
  .landlord-compact-table tbody tr {
    display: block;
    padding: 14px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    border-radius: 10px;
  }

  .rf-list-table tbody tr:last-child,
  .room-compact-table tbody tr:last-child,
  .landlord-compact-table tbody tr:last-child {
    margin-bottom: 0;
    border-bottom: 0;
  }

  .rf-list-table td,
  .room-compact-table td,
  .landlord-compact-table td {
    display: grid;
    grid-template-columns: minmax(72px, 32%) minmax(0, 1fr);
    gap: 6px 12px;
    padding: 6px 0;
    border-bottom: 0;
    text-align: left !important;
    align-items: start;
  }

  .rf-list-table td::before,
  .room-compact-table td::before,
  .landlord-compact-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.35;
    padding-top: 2px;
  }

  .rf-list-table td.rf-list-actions,
  .room-compact-table td.room-actions,
  .rf-list-table td.rf-col-actions,
  .landlord-compact-table td.landlord-room-actions {
    display: block;
  }

  .rf-list-table td.rf-list-actions::before,
  .room-compact-table td.room-actions::before,
  .rf-list-table td.rf-col-actions::before,
  .landlord-compact-table td.landlord-room-actions::before {
    padding-top: 6px;
  }

  .rf-list-table .rf-actions-wrap,
  .room-compact-table .room-actions-wrap,
  .landlord-compact-table .landlord-actions-wrap,
  .account-room-actions {
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .account-room-btn {
    font-size: 0.78rem;
    padding: 0.32rem 0.58rem;
  }
}

/* Navigation: kein voller Gelb-Balken beim Admin-Dropdown auf Mobile */
@media (max-width: 991.98px) {
  .rf-nav-pill.dropdown-toggle,
  .rf-nav-pill.dropdown-toggle.is-active,
  .rf-nav-pill.dropdown-toggle.is-section-current {
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: none !important;
    color: #111 !important;
  }

  .rf-nav-pill.dropdown-toggle.show,
  .rf-nav-pill.dropdown-toggle[aria-expanded="true"] {
    background: #fff !important;
    border-color: rgba(17, 17, 17, 0.28) !important;
  }

  .rf-navbar-menu .nav-item.dropdown {
    flex-direction: column;
    align-items: stretch;
  }

  .rf-navbar .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100%;
    margin: 4px 0 0 !important;
    padding: 6px !important;
    border: 1px solid rgba(17, 17, 17, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    background: #fffaf4 !important;
  }

  .rf-navbar .dropdown-header {
    padding: 8px 12px 4px;
    background: transparent !important;
    color: rgba(17, 17, 17, 0.55) !important;
  }

  .rf-navbar .dropdown-divider {
    margin: 6px 8px;
    border-color: rgba(17, 17, 17, 0.1);
  }
}

/* Desktop: Admin-Bereich in der Hauptnavigation markieren */
@media (min-width: 992px) {
  .rf-nav-pill.dropdown-toggle.is-section-current {
    background: #fff !important;
    border-color: #111 !important;
    box-shadow: inset 3px 0 0 #ff9c01 !important;
  }
}

/* Startseite: Mobile-Ansicht */
@media (max-width: 767.98px) {
  body.rf-page-home main.container {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.rf-page-home .rf-home.row {
    --bs-gutter-y: 1rem;
  }

  body.rf-page-home .rf-home-map {
    height: min(52vh, 360px) !important;
    border-width: 2px !important;
    border-radius: 16px !important;
  }

  body.rf-page-home #filtersForm .form-label {
    margin-bottom: 4px;
    font-size: 12px;
  }

  body.rf-page-home #filtersForm .filters-primary-row {
    gap: 10px;
  }

  body.rf-page-home .rf-site-footer {
    margin-top: 20px;
    padding-bottom: 12px;
  }

  body.rf-page-home .rf-site-footer-panel {
    padding: 16px 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  body.rf-page-home .rf-site-footer-inner {
    gap: 0;
  }

  body.rf-page-home .rf-site-footer-art,
  body.rf-page-home .rf-site-footer-rule,
  body.rf-page-home .rf-site-footer-bottom {
    display: none !important;
  }

  body.rf-page-home .rf-site-footer-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  body.rf-page-home .rf-site-footer-mobile-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding-top: 2px;
    text-align: center;
  }

  body.rf-page-home .rf-site-footer-mobile-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
  }

  body.rf-page-home .rf-site-footer-mobile-nav a {
    color: #111;
    text-decoration: none;
  }

  body.rf-page-home .rf-site-footer-mobile-nav a:hover,
  body.rf-page-home .rf-site-footer-mobile-nav a:focus {
    color: #ff9c01;
  }

  body.rf-page-home .rf-site-footer-mobile-copy {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
  }

  body.rf-page-home .rf-site-footer-logo {
    padding: 0;
  }

  body.rf-page-home .rf-site-footer-logo img {
    width: min(148px, 46vw);
    height: auto;
  }
}
