/* Global nearB plugin variables and small helpers
   This file sets theme variables used across plugin UI (Tabler-based)
*/
:root{
  --nearb-color-primary: #F28A04;
}

/* Mirror into Tabler variables so Tabler styles pick it up where used */
:root{
  --tblr-color-primary: var(--nearb-color-primary);
  --tblr-color-primary-600: var(--nearb-color-primary);
}

/* small utility to align plugin UI to our font stack if needed */
.nearb-ui, .nearb-ui *{ font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }

main{
  max-width:100% !important;
}

/* Tip submission modal refinements */
.nearb-tip-modal {
  border-radius: 1rem;
  overflow: hidden;
  padding: 20px;
}

.nearb-tip-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}

.nearb-tip-form-header,
.nearb-tip-form-body,
.nearb-tip-form-footer {
  padding: 1.5rem;
}

.nearb-tip-form-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8fafc;
}

.nearb-tip-form-body {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

.nearb-tip-form-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.nearb-tip-form-footer .btn-list {
  display: flex;
  gap: 0.75rem;
}

.nearb-tip-image-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nearb-tip-image-preview {
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.nearb-tip-image-preview img {
  width: 100%;
  border-radius: 0.5rem;
  object-fit: cover;
}

.nearb-tip-category-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nearb-tip-category-group .btn {
  min-width: 120px;
}

.nearb-tip-address-group .btn {
  white-space: nowrap;
}

.nearb-tip-coords {
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.nearb-tip-map-wrapper {
  height: 280px;
  min-height: 280px;
  position: relative;
}

.nearb-tip-map {
  width: 100%;
  height: 100%;
  min-height: 280px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Fix for Leaflet in modals */
.nearb-tip-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

.nearb-tip-modal .leaflet-control-container {
  position: absolute;
}

.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

@media (max-width: 768px) {
  .nearb-tip-form-header,
  .nearb-tip-form-body,
  .nearb-tip-form-footer {
    padding: 1.25rem;
  }
}