.frm-wrapper {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef2f7;
  --frm-font: "Nunito", Helvetica, Arial, Lucida, sans-serif;
  font-family: var(--frm-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
}

.frm-wrapper * {
  box-sizing: border-box;
  font-family: inherit !important;
}

/* Google Maps InfoWindow is rendered outside our DOM subtree */
.gm-style .frm-iw,
.gm-style .frm-iw * {
  font-family: var(--frm-font) !important;
}

.frm-label {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: #334155;
}

.frm-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  font-family: inherit;
  height: 44px;
  line-height: 22px;
}

.frm-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  font-family: inherit;
  height: 44px;
  line-height: 22px;
}

.frm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #1f5cff;
  background: #1f5cff;
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.frm-btn:hover { filter: brightness(0.95); }
.frm-btn:active { transform: translateY(1px); }

.frm-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr 180px auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.frm-field {
  display: grid;
  gap: 6px;
}

.frm-field--actions {
  align-self: end;
}

.frm-message {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  color: #333;
  font-size: 14px;
}

.frm-message[data-type="warn"] {
  border-color: #f0d48a;
  background: #fff8e6;
}

.frm-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  height: 70vh;
  min-height: 560px;
  max-height: 760px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.frm-panel {
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0; /* required so .frm-list can scroll inside CSS grid */
}

.frm-panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.frm-panel-title {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.frm-panel-subtitle {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.frm-list {
  padding: 8px;
  overflow: auto;
  min-height: 0; /* required so overflow works inside CSS grid */
}

.frm-list-empty {
  padding: 14px 12px;
  color: #666;
  font-size: 14px;
}

.frm-list-item {
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
}

.frm-list-item:hover {
  border-color: #e7e7e7;
  background: #fafafa;
}

.frm-list-title {
  font-weight: 900;
  color: #1f5cff;
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.25;
}

.frm-list-subtitle {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  margin: -2px 0 6px;
}

.frm-list-addr {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
}

.frm-list-contact {
  margin-top: 8px;
  color: #0f172a;
  font-size: 13px;
}

.frm-list-meta strong {
  font-weight: 700;
}

.frm-standalone-note {
  margin-top: 6px;
  color: #14532d;
  font-size: 12px;
  font-weight: 600;
}

.frm-link {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f5cff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.frm-link:hover { text-decoration: underline; }

.frm-map-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e9e9e9;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  background: #fff;
  height: 100%;
}

.frm-map {
  width: 100%;
  height: 100%;
}

.frm-note {
  font-size: 13px;
  color: #475569;
}

.frm-disclaimer {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.35;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.frm-disclaimer::before {
  content: "OBS";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-width: 34px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fb923c;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 11px;
  line-height: 20px;
  flex: 0 0 auto;
}

.frm-disclaimer--compact {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.frm-error {
  padding: 10px 12px;
  background: #fff1f1;
  border: 1px solid #f0b4b4;
  border-radius: 10px;
  color: #7a1e1e;
}

.frm-iw {
  max-width: 320px;
}

.frm-iw-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.frm-iw-subtitle {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  margin: -4px 0 6px;
}

.frm-iw-address {
  margin-bottom: 8px;
}

.frm-iw-contact {
  margin-bottom: 10px;
}

.frm-products-title {
  font-weight: 700;
  margin: 8px 0 4px;
}

.frm-products-cat {
  margin-top: 8px;
  font-weight: 800;
  font-size: 12px;
  color: #334155;
  letter-spacing: 0.2px;
  text-transform: none;
}

.frm-products-list {
  margin: 6px 0 0;
  padding-left: 18px;
  padding-bottom: 10px !important;
  line-height: 18px;
}

.frm-products-list li {
  line-height: 18px;
  margin: 0;
  padding: 0;
}

.frm-prod-name { font-weight: 500; }
.frm-prod-qty { color: #333; }

.frm-muted {
  color: #666;
  font-size: 12px;
}

.frm-iw-foot {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

/* Store (virtual) pages */
.frm-store-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: start;
}

.frm-store-card {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.frm-store-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.frm-store-map {
  width: 100%;
  height: 340px;
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}

.frm-store-card-body {
  margin-top: 12px;
}

.frm-store-note {
  margin: 6px 0 10px;
}

@media (max-width: 900px) {
  .frm-toolbar {
    grid-template-columns: 1fr;
  }

  .frm-layout {
    grid-template-columns: 1fr;
    /* Keep the widget self-contained on mobile: internal scroll instead of a super long page */
    grid-template-rows: 1fr 360px;
    height: calc(100svh - 260px);
    height: calc(100vh - 260px);
    min-height: 620px;
    max-height: none;
    overflow: hidden;
  }

  .frm-map-wrap {
    min-height: 0;
    height: 100%;
  }

  /* If the theme uses a fixed mobile footer/nav, make sure our last content isn't covered */
  .frm-wrapper {
    margin-bottom: 120px;
  }

  /* Store page: stack columns and tighten map height */
  .frm-store-grid {
    grid-template-columns: 1fr;
  }

  .frm-store-map {
    height: 260px;
  }
}

