/* ==========================================================
   Bikerhotel-Tool — MOTORRADO.de
   Namespace: bht- (alle Klassen)
   ========================================================== */

:root {
  --motorrado-red:        #DC143C;
  --motorrado-dark-red:   #B01030;
  --motorrado-green:      #88FF88;
  --motorrado-teal:       #007799;
  --motorrado-gray:       #555555;
  --motorrado-light:      #F5F5F5;
  --motorrado-light-gray: #C5C7C6;
  --motorrado-black:      #191919;
  --motorrado-white:      #FFFFFF;

  /* Fonts: Erbt vom Theme (Encode Sans Semi Condensed) */
  --bht-font-heading:     'Encode Sans Semi Condensed', Arial, sans-serif;
  --bht-font-body:        'Encode Sans Semi Condensed', Arial, sans-serif;

  --badge-hotel:          #DC143C;
  --badge-gasthof:        #fd7e14;
  --badge-pension:        #007799;
  --badge-campingplatz:   #88ff88;
  --badge-ferienwohnung:  #6f42c1;
  --badge-ferienhaus:     #e83e8c;
  --badge-portal:         #7A7A7A;
}

/* ---- Container ---- */
.bht-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---- Section Header (blauer Hintergrund) ---- */
.bht-header-bar {
  background: var(--motorrado-teal);
  border-radius: 6px 6px 0 0;
  padding: 24px 24px 18px;
  margin: 40px 0 0;
}

.bht-section-header {
  font-family: var(--bht-font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--motorrado-white);
  margin: 0 0 4px;
  padding: 0;
  border: none;
}

.bht-section-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  margin: 0;
  padding: 0;
}

/* ---- Filter-Bar ---- */
.bht-filter-bar {
  background: var(--motorrado-white);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.bht-filter-bar label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--motorrado-gray);
  margin-bottom: 4px;
  display: block;
}

.bht-filter-bar .form-select,
.bht-filter-bar .form-control {
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  padding: 8px 12px;
  transition: border-color 0.2s;
}

.bht-filter-bar .form-select:focus,
.bht-filter-bar .form-control:focus {
  border-color: var(--motorrado-red);
  box-shadow: 0 0 0 3px rgba(220,20,60,0.1);
}

/* Suchfeld: Eigene Zeile, volle Breite */
.bht-search-row {
  margin-bottom: 16px;
}

.bht-search-row .input-group {
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.bht-search-row .input-group:focus-within {
  border-color: var(--motorrado-red);
  box-shadow: 0 0 0 3px rgba(220,20,60,0.1);
}

.bht-search-row .input-group .input-group-text {
  background: #fff;
  border: none;
  padding-left: 14px;
}

.bht-search-row .input-group .form-control {
  border: none;
  box-shadow: none;
  padding-left: 4px;
}

.bht-search-row .input-group .form-control:focus {
  border: none;
  box-shadow: none;
}

/* Filter-Zeile: Art + Land + Button */
.bht-filter-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* ---- Badges ---- */
.bht-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  color: #fff;
}

.bht-badge i {
  font-size: 10px;
}

.bht-badge-hotel          { background: var(--badge-hotel); }
.bht-badge-gasthof        { background: var(--badge-gasthof); }
.bht-badge-pension        { background: var(--badge-pension); }
.bht-badge-campingplatz   { background: var(--badge-campingplatz); color: var(--motorrado-black); }
.bht-badge-ferienwohnung  { background: var(--badge-ferienwohnung); }
.bht-badge-ferienhaus     { background: var(--badge-ferienhaus); }
.bht-badge-buchungsportal { background: var(--badge-portal); }

/* ---- Buttons ---- */
.bht-btn-primary {
  background: var(--motorrado-red);
  color: #fff;
  font-family: var(--bht-font-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.bht-btn-primary:hover {
  background: var(--motorrado-dark-red);
}

.bht-btn-filter {
  background: var(--motorrado-green);
  color: var(--motorrado-black);
  font-family: var(--bht-font-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.bht-btn-filter:hover {
  background: #6de06d;
}

.bht-btn-secondary {
  background: var(--motorrado-teal);
  color: #fff;
  font-family: var(--bht-font-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.bht-btn-secondary:hover {
  background: #005f78;
}

/* ---- Ergebnis-Counter ---- */
.bht-result-count {
  font-size: 14px;
  color: var(--motorrado-gray);
  margin-bottom: 16px;
}

.bht-result-count strong {
  color: var(--motorrado-black);
}

/* ---- Tabelle ---- */
.bht-table-wrapper {
   border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 2px;
}

.bht-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.bht-table thead {
  background: var(--motorrado-red);
  color: #fff;
}

.bht-table thead th {
  font-family: var(--bht-font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 12px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.3);
  transition: background 0.15s;
}

.bht-table thead th:last-child {
  border-right: none;
}

.bht-table thead th:hover {
  background: var(--motorrado-dark-red);
}

.bht-table thead th.bht-no-sort {
  cursor: default;
}

.bht-table thead th.bht-no-sort:hover {
  background: var(--motorrado-red);
}

.bht-table thead th .sort-icon {
  margin-left: 6px;
  opacity: 0.6;
  font-size: 10px;
}

.bht-table thead th.bht-sorted .sort-icon {
  opacity: 1;
}

/* Spaltenbreiten */
.bht-col-name         { width: 30%; }
.bht-col-art          { width: 15%; }
.bht-col-anschrift    { width: 24%; }
.bht-col-hinweis      { width: 22%; }
.bht-col-web          { width: 4%; }
.bht-col-maps         { width: 5%; }

.bht-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}

.bht-table tbody tr:nth-child(even) {
  background: var(--motorrado-light);
}

.bht-table tbody tr:nth-child(odd) {
  background: var(--motorrado-white);
}

.bht-table tbody tr:hover {
  background: #fce4e8;
}

.bht-table tbody td {
  padding: 10px 12px;
  vertical-align: top;
}

/* Spalte Unterkunft: Blaue Schrift, kein Hintergrund */
.bht-table .bht-name-cell {
  font-weight: 600;
}

.bht-table .bht-name-cell a {
  color: var(--motorrado-teal);
  text-decoration: none;
  transition: color 0.2s;
}

.bht-table .bht-name-cell a:hover {
  color: var(--motorrado-red);
}

/* Anschrift */
.bht-address-line {
  line-height: 1.4;
}

.bht-address-city {
  color: var(--motorrado-black);
  font-size: 14px;
}

.bht-address-small {
  color: var(--motorrado-black);
  font-size: 12px;
}

/* Hinweis */
.bht-table .bht-remark {
  font-size: 12px;
  color: var(--motorrado-black);
  font-style: italic;
}

/* Web-/Maps-Links */
.bht-table .bht-link-icon a {
  color: var(--motorrado-teal);
  font-size: 14px;
}

.bht-table .bht-link-icon a:hover {
  color: var(--motorrado-red);
}

/* ---- Paginierung ---- */
.bht-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.bht-pagination button {
  background: var(--motorrado-white);
  border: 2px solid #e0e0e0;
  color: var(--motorrado-black);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.bht-pagination button:hover,
.bht-pagination button.active {
  background: var(--motorrado-red);
  border-color: var(--motorrado-red);
  color: #fff;
}

.bht-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.bht-pagination button:disabled:hover {
  background: var(--motorrado-white);
  border-color: #e0e0e0;
  color: var(--motorrado-black);
}

.bht-pagination .bht-page-info {
  font-size: 13px;
  color: var(--motorrado-gray);
  margin-left: auto;
}

.bht-pagination .bht-page-select {
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 13px;
  margin: 0 4px;
}

/* ---- Admin-Bereich ---- */
.bht-admin-bar {
  background: var(--motorrado-black);
  border-radius: 6px;
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bht-admin-bar .bht-admin-label {
  color: var(--motorrado-light-gray);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bht-admin-bar .bht-admin-status {
  color: var(--motorrado-green);
  font-size: 13px;
  margin-left: auto;
}

.bht-admin-bar .bht-admin-status.bht-error {
  color: var(--motorrado-red);
}

.bht-admin-upload {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bht-admin-upload input[type="file"] {
  font-size: 13px;
  color: var(--motorrado-light-gray);
}

/* ---- Editorial-Bereich (WordPress-Editor-Inhalt) ---- */
.bht-editorial {
  margin-bottom: 0;
  padding-bottom: 0;
}

.bht-editorial img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.bht-editorial p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--motorrado-black);
  margin-bottom: 16px;
}

/* ---- Zurück-Button ---- */
.bht-back-btn {
  display: none;
  margin-bottom: 16px;
}

.bht-back-btn.bht-visible {
  display: inline-block;
}

/* ---- Responsive ---- */

/* Tablet: Tabelle etwas enger */
@media (max-width: 992px) {
  .bht-table {
    font-size: 13px;
  }

  .bht-table thead th {
    padding: 12px 8px;
    font-size: 11px;
  }

  .bht-table tbody td {
    padding: 8px;
  }
}

/* Mobil: Tabelle wird zu Card-Liste */
@media (max-width: 768px) {
  .bht-header-bar {
    padding: 18px 16px 14px;
  }

  .bht-section-header {
    font-size: 22px;
  }

  .bht-filter-bar {
    padding: 16px;
  }

  .bht-filter-row {
    flex-direction: column;
    gap: 12px;
  }

  .bht-filter-row > div {
    min-width: 100% !important;
  }

  .bht-admin-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .bht-admin-upload {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  /* Tabellenkopf ausblenden */
  .bht-table thead {
    display: none;
  }

  .bht-table,
  .bht-table tbody,
  .bht-table tr,
  .bht-table td {
    display: block;
    width: 100%;
  }

  .bht-table {
    table-layout: auto;
  }

  .bht-table-wrapper {
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  /* Jede Zeile wird eine Card */
  .bht-table tbody tr {
    background: var(--motorrado-white);
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .bht-table tbody tr:nth-child(even) {
    background: var(--motorrado-white);
  }

  .bht-table tbody tr:hover {
    background: var(--motorrado-white);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  .bht-table tbody td {
    padding: 0;
    border: none;
  }

  /* Name: Groß und prominent */
  .bht-table .bht-name-cell {
    font-size: 16px;
    order: 1;
  }

  .bht-table .bht-name-cell a {
    color: var(--motorrado-teal);
  }

  /* Art-Badge */
  .bht-table tbody td:nth-child(2) {
    order: 2;
    margin-bottom: 4px;
  }

  /* Anschrift */
  .bht-table tbody td:nth-child(3) {
    order: 3;
  }

  .bht-address-line {
    font-size: 13px;
  }

  /* Hinweis */
  .bht-table .bht-remark {
    order: 4;
  }

  /* Leere Hinweis-Zellen ausblenden */
  .bht-table .bht-remark:empty {
    display: none;
  }

  /* Web-Link */
  .bht-table .bht-link-icon {
    order: 5;
    text-align: left !important;
  }

  .bht-table .bht-link-icon:empty {
    display: none;
  }

  .bht-table .bht-link-icon a {
    font-size: 13px;
  }

  .bht-table .bht-link-icon a::after {
    content: ' Webseite';
    font-family: var(--bht-font-body);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  /* Maps-Link (falls vorhanden) */
  .bht-table .bht-link-icon + .bht-link-icon a::after {
    content: ' Google Maps';
  }

  /* Paginierung */
  .bht-pagination {
    justify-content: center;
  }

  .bht-pagination .bht-page-info {
    margin-left: 0;
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}

/* Sehr kleine Screens */
@media (max-width: 400px) {
  .bht-container {
    padding: 0 12px 40px;
  }

  .bht-section-header {
    font-size: 20px;
  }

  .bht-pagination button {
    padding: 6px 10px;
    font-size: 12px;
  }
}
