.expofp-editor {
  max-width: 920px;
  margin: 2rem 0;
  font-family: inherit;
}

.expofp-editor *,
.expofp-editor *::before,
.expofp-editor *::after {
  box-sizing: border-box;
}

.expofp-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.4rem;
}

.expofp-inline input {
  flex: 1;
}

.expofp-editor input[type="text"],
.expofp-editor input[type="url"],
.expofp-editor input[type="email"],
.expofp-editor input[type="tel"],
.expofp-editor input[type="number"],
.expofp-editor textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  font: inherit;
}

.expofp-editor button {
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  background: #111;
  color: #fff;
}

.expofp-card,
.expofp-details-form,
.expofp-lookup-form {
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  background: #fff;
}

.expofp-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin-bottom: 1.5rem;
}

.expofp-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.expofp-field--checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expofp-field--checkbox label {
  margin: 0;
}

.expofp-field--checkbox input {
  width: auto;
}

.expofp-protected-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.expofp-locked-field {
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 0.75rem;
  background: #f8f8f8;
}

.expofp-locked-field span {
  display: block;
  font-size: 0.85rem;
  opacity: 0.7;
}

.expofp-locked-field strong {
  display: block;
  margin-top: 0.2rem;
}

.expofp-logo-preview {
  max-width: 240px;
  max-height: 160px;
  display: block;
  margin-bottom: 1rem;
  object-fit: contain;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 0.5rem;
  background: #fff;
}

.expofp-status {
  min-height: 1.5rem;
  margin: 1.5rem 0;
  font-weight: 700;
}

.expofp-status--info { color: #555; }
.expofp-status--success { color: #146c2e; }
.expofp-status--error { color: #b42318; }

.expofp-help {
  color: #555;
  font-size: 0.95rem;
}

.expofp-empty-prompt {
  border: 1px dashed #bbb;
  border-radius: 8px;
  padding: 1rem;
  background: #fafafa;
}

.expofp-previews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.expofp-preview-item {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.expofp-preview-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.expofp-preview-item span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  word-break: break-word;
}

.expofp-hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .expofp-fields,
  .expofp-protected-grid,
  .expofp-previews {
    grid-template-columns: 1fr;
  }

  .expofp-inline {
    display: block;
  }

  .expofp-inline button {
    margin-top: 0.75rem;
  }
}

.expofp-logo-card {
  display: grid;
  gap: 1rem;
}

.expofp-logo-top {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.expofp-nameboard-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
  gap: 0.75rem;
}

.expofp-nameboard-row > div {
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 0.75rem;
  background: #f8f8f8;
}

.expofp-nameboard-row span,
.expofp-char-count {
  display: block;
  font-size: 0.85rem;
  opacity: 0.7;
}

.expofp-nameboard-row strong {
  display: block;
  margin-top: 0.2rem;
}

.expofp-button,
.expofp-mini-button {
  display: inline-block;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  background: #111;
  color: #fff;
}

.expofp-button {
  padding: 0.75rem 1rem;
}

.expofp-mini-button {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .expofp-logo-top,
  .expofp-nameboard-row {
    grid-template-columns: 1fr;
  }
}

/* APITS orange treatment */
.expofp-editor button,
.expofp-button,
.expofp-mini-button {
  background: #EC7203;
  color: #fff;
}

.expofp-editor button:hover,
.expofp-button:hover,
.expofp-mini-button:hover {
  background: #d86602;
  color: #fff;
}

.expofp-logo-form label,
.expofp-details-form h3,
.expofp-card h3 {
  color: #EC7203;
}

.expofp-selected-logo {
  margin: 0.75rem 0;
}

.expofp-log-panel {
  margin-top: 1rem;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fafafa;
}

.expofp-log-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: #EC7203;
}

.expofp-log-panel pre {
  white-space: pre-wrap;
  line-height: 1.75;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.expofp-contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.expofp-contact-row > div {
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 0.75rem;
  background: #f8f8f8;
}

.expofp-contact-row span {
  display: block;
  font-size: 0.85rem;
  opacity: 0.7;
}

.expofp-contact-row strong {
  display: block;
  margin-top: 0.2rem;
}

@media (max-width: 760px) {
  .expofp-contact-row {
    grid-template-columns: 1fr;
  }
}

.expofp-secondary-button {
  margin-top: 1rem;
  background: #fff;
  color: #EC7203;
  border: 1px solid #EC7203;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

.expofp-secondary-button:hover,
.expofp-secondary-button:focus {
  background: #fff7f0;
}

.expofp-admin-debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}


.expofp-admin-debug-output {
    display: block;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  background: #111;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 520px;
  overflow: auto;
  line-height: 1.55;
  font-size: 0.85rem;
}

/* ── New layout additions ── */
.expofp-hidden-lookup { display: none; }

.expofp-help-spaced { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.expofp-welcome-msg { font-size: 1.1rem; margin-bottom: 0.25rem; }

/* Stand details inline row */
.expofp-stand-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; margin: 0.75rem 0; }
.expofp-stand-box { background: #f4f4f4; border: 1px solid #ddd; border-radius: 6px; padding: 0.5rem 0.85rem; display: flex; flex-direction: column; min-width: 80px; }
.expofp-stand-box--small { font-size: 0.9em; }
.expofp-stand-label { font-size: 0.75em; color: #666; text-transform: uppercase; letter-spacing: 0.04em; }
.expofp-stand-val { font-size: 1rem; font-weight: 600; margin-top: 0.15rem; }

/* Social links section */
.expofp-social-section { margin-top: 1.5rem; }
.expofp-social-section h3 { margin-bottom: 0.5rem; }

/* Lock notice */
.expofp-locked-notice { background: #fff8e1; border-left: 4px solid #f9a825; padding: 1rem 1.25rem; border-radius: 4px; margin-bottom: 1.25rem; }
.expofp-locked-notice p { margin: 0; }

/* Read-only fields */
.expofp-readonly { background: #f9f9f9 !important; color: #555 !important; cursor: not-allowed; }

/* Floor plan link */
.expofp-floorplan-link { margin-top: 1.25rem; padding: 0.75rem 1rem; background: #f0f7ff; border-radius: 6px; border: 1px solid #cce0ff; }
.expofp-floorplan-link p { margin: 0; }

/* Floor plan inline link under nameboard */
.expofp-floorplan-inline { margin-top: 0.5rem; }
.expofp-floorplan-inline a { font-size: 0.9rem; text-decoration: underline; }

/* Welcome banner */
.expofp-welcome-banner { background: #f0f7ff; border-left: 4px solid #2ea3f2; border-radius: 4px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.expofp-welcome-banner h2 { font-size: 1.2rem; margin-bottom: 0.75rem; padding-bottom: 0; color: #333; }
.expofp-welcome-banner p { margin-bottom: 0.5rem; font-size: 0.95rem; line-height: 1.6; }
.expofp-welcome-banner p:last-child { margin-bottom: 0; }
.expofp-welcome-banner a { color: #2ea3f2; text-decoration: underline; }

/* ── Don't forget artwork ── */
.expofp-dont-forget { color: #c0392b; font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }

/* ── Mandatory fields ── */
.expofp-mandatory-star { color: #c0392b; font-weight: 700; margin-left: 2px; }
.expofp-field--mandatory > label { font-weight: 600; }
.expofp-char-count--over { color: #c0392b; font-weight: 600; }
.expofp-char-count--warn { color: #e67e22; }

/* ── Show Guide field ── */
.expofp-field--showguide { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #eee; }
.expofp-sg-help { font-size: 0.82rem; color: #777; margin: 0.35rem 0 0.5rem; }
.expofp-gen-btn { margin-top: 0.5rem; font-size: 0.9rem; }

/* ── Toast popup ── */
.expofp-toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(1rem); background: #27ae60; color: #fff; padding: 0.75rem 1.5rem; border-radius: 6px; font-size: 0.95rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.18); z-index: 99999; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; white-space: nowrap; }
.expofp-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.expofp-toast--error { background: #c0392b; }
.expofp-toast-icon { font-size: 1.1rem; margin-right: 0.4rem; }

/* ── Banner header with contact button ── */
.expofp-banner-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.expofp-banner-header h2 { margin: 0; padding: 0; flex: 1; }
.expofp-contact-btn { flex-shrink: 0; background: #2ea3f2; color: #fff !important; padding: 0.4rem 1rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.expofp-contact-btn:hover { background: #1a8fd1; }

/* ── Empty category ── */
.expofp-stand-val--empty { color: #999; font-style: italic; font-weight: 400; }
