html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

.bk-app-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f4f4f4;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
}

.bk-app-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.bk-app-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.bk-app-title-wrap strong {
  font-size: 18px;
  white-space: nowrap;
}

.bk-app-title-wrap span {
  font-size: 15px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.bk-no-header .bk-app-header {
  display: none;
}

#map {
  width: 100%;
  height: calc(100vh - 48px);
}

body.bk-no-header #map {
  height: 100vh;
}

.bk-location-control {
  background: #ffffff;
}

.bk-location-button {
  min-height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: #ffffff;
  font: 14px Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.bk-location-button:hover,
.bk-location-button:focus {
  background: #f4f4f4;
}

.bk-location-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

@media (max-width: 480px) {
  .bk-location-button {
    max-width: calc(100vw - 72px);
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
    white-space: nowrap;
  }
}


body.bk-form-open .leaflet-control-zoom,
body.bk-form-open .leaflet-control-geocoder,
body.bk-form-open .bk-location-control,
body.bk-confirm-open .leaflet-control-zoom,
body.bk-confirm-open .leaflet-control-geocoder,
body.bk-confirm-open .bk-location-control,
body.bk-mail-dialog-open .leaflet-control-zoom,
body.bk-mail-dialog-open .leaflet-control-geocoder,
body.bk-mail-dialog-open .bk-location-control {
  display: none;
}

body.bk-form-open .leaflet-popup,
body.bk-confirm-open .leaflet-popup {
  z-index: 1100;
}

.bk-mail-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  background: rgba(0, 0, 0, 0.42);
}

.bk-mail-dialog-overlay.is-visible {
  display: block;
}

.leaflet-popup-content {
  font-size: 14px;
  width: 280px;
}

.bk-form label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.bk-form input,
.bk-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.bk-form textarea {
  height: 80px;
  resize: vertical;
}

.bk-form button {
  margin-top: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.bk-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.bk-form-actions button {
  margin-top: 0;
}

.bk-form-cancel-button {
  background: #f4f4f4;
  border: 1px solid #aaa;
}

.bk-hint {
  font-size: 12px;
  color: #555;
  margin-top: 8px;
}

.bk-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bk-toast {
  position: absolute;
  top: 64px;
  right: 16px;
  z-index: 1000;
  max-width: 320px;
  padding: 12px 14px;
  background: #ffffff;
  border-left: 5px solid #3a7d44;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
  display: none;
}

body.bk-no-header .bk-toast {
  top: 16px;
}

body.bk-mail-dialog-open .bk-toast {
  position: fixed;
  z-index: 1300;
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.bk-toast.is-visible {
  display: block;
}

.bk-toast strong {
  display: block;
  margin-bottom: 4px;
}

.bk-popup-title {
  font-weight: bold;
  margin-bottom: 8px;
}

.bk-popup-row {
  margin-top: 6px;
}

.bk-popup-label {
  font-weight: bold;
}

@media (max-width: 640px) {
  .bk-app-header {
    padding: 0 12px;
    gap: 10px;
  }

  .bk-app-title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .bk-app-title-wrap strong {
    font-size: 16px;
  }

  .bk-app-title-wrap span {
    font-size: 13px;
  }
}

.bk-toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.bk-toast-button {
  display: inline-block;
  padding: 7px 10px;
  cursor: pointer;
}

.bk-toast-button-secondary {
  background: #f4f4f4;
  border: 1px solid #aaa;
}

.bk-popup-image {
  display: block;
  max-width: 100%;
  max-height: 160px;
  margin-top: 4px;
  border-radius: 4px;
  object-fit: cover;
}

.bk-location-confirm p {
  margin: 8px 0 0;
  line-height: 1.35;
}

.bk-location-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.bk-location-confirm-button {
  padding: 8px 12px;
  cursor: pointer;
}

.bk-location-confirm-button-secondary {
  background: #f4f4f4;
  border: 1px solid #aaa;
}

@media (max-width: 640px) {
  .bk-location-confirm-popup .leaflet-popup-content {
    width: 230px;
    max-width: calc(100vw - 72px);
  }

  .bk-location-confirm-actions {
    flex-direction: column;
  }

  .bk-location-confirm-button {
    width: 100%;
  }
}

@media (max-width:480px){
 .bk-location-button{
   max-width:calc(100vw - 88px);
   font-size:12px;
   white-space:normal;
   line-height:1.2;
   padding:6px 8px;
 }
}
.bk-form-actions button,
.bk-location-confirm-button{
 border-radius:8px;
 padding:9px 14px;
 font-weight:600;
}
.bk-form button[type=submit],
.bk-location-confirm-button{
 background:#0b6fd3;
 color:#fff;
 border:1px solid #0b6fd3;
}
.bk-form-cancel-button,
.bk-location-confirm-button-secondary{
 background:#f3f4f6;
 color:#0b6fd3;
 border:1px solid #c9ced6;
}


/* v1.5.9: Einheitliches Buttondesign auch im Update-Dialog */
.bk-toast-button {
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  background: #0b6fd3;
  color: #fff;
  border: 1px solid #0b6fd3;
}

.bk-toast-button-secondary {
  background: #f3f4f6;
  color: #0b6fd3;
  border: 1px solid #c9ced6;
}
