/* On-canvas editor chrome — Layer 1 Farangbazar tokens */
#fb-canvas-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #0b4f6c;
  color: #fff;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.16);
}
.fb-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.fb-bar-title { font-weight: 800; }
.fb-bar-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.fb-bar-count svg { width: 1rem; height: 1rem; }
.fb-bar-hint { font-size: 0.85rem; opacity: 0.9; flex: 1; }
.fb-bar-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fb-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.2, 0, 0, 1);
}
.fb-bar-btn svg { width: 1.1rem; height: 1.1rem; }
.fb-bar-btn:hover { background: rgba(255,255,255,0.12); }
.fb-bar-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fb-bar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.fb-bar-primary { background: #059669; border-color: #059669; }
.fb-bar-primary:hover { background: #047857; }
.fb-bar-primary.fb-needs-save { box-shadow: 0 0 0 2px #fff; }
.fb-bar-menu { position: relative; }
.fb-bar-drop {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  background: #fff;
  color: #134e4a;
  border: 1px solid #d7e5ea;
  border-radius: 12px;
  min-width: 14rem;
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.12);
  padding: 0.35rem;
  z-index: 90;
}
.fb-bar-drop button {
  display: block;
  width: 100%;
  text-align: start;
  background: none;
  border: 0;
  padding: 0.55rem 0.7rem;
  font: inherit;
  border-radius: 8px;
  cursor: pointer;
}
.fb-bar-drop button:hover { background: #f0f7f8; }
.fb-bar-drop button:focus-visible { outline: 3px solid #0b4f6c; }

body.fb-editing [data-fb-edit="text"] {
  outline: 1px dashed transparent;
  cursor: text;
  min-width: 1ch;
}
body.fb-editing [data-fb-edit="text"]:hover,
body.fb-editing [data-fb-edit="text"]:focus {
  outline: 2px dashed #0b4f6c;
  outline-offset: 3px;
  background: rgba(11, 79, 108, 0.06);
}
body.fb-editing .fb-img-hit {
  cursor: pointer;
  outline: 2px dashed transparent;
  outline-offset: 3px;
  transition: outline-color 200ms cubic-bezier(0.2, 0, 0, 1);
}
body.fb-editing .fb-img-hit:hover,
body.fb-editing .fb-img-hit:focus-visible {
  outline-color: #059669;
}

#fb-img-pop {
  position: absolute;
  z-index: 85;
  background: #fff;
  color: #134e4a;
  border: 1px solid #d7e5ea;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.12);
  max-width: min(22rem, calc(100vw - 24px));
}
#fb-img-pop label:not(.fb-upload-btn) { display: block; font-weight: 600; font-size: 0.9rem; }
#fb-img-pop input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d7e5ea;
  border-radius: 8px;
  font: inherit;
}
#fb-img-pop input:focus-visible { outline: 3px solid #0b4f6c; }
.fb-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  justify-content: center;
  background: #0b4f6c;
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.2, 0, 0, 1);
  margin-bottom: 0.35rem;
}
.fb-upload-btn svg { width: 1.15rem; height: 1.15rem; }
.fb-upload-btn:hover { background: #083d54; }
.fb-upload-btn:focus-visible { outline: 3px solid #0b4f6c; outline-offset: 2px; }
.fb-upload-hint {
  margin: 0.2rem 0 0.7rem;
  font-size: 0.78rem;
  color: #3d656e;
  font-weight: 500;
}
.fb-img-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.fb-img-actions button {
  border: 1px solid #d7e5ea;
  background: #f0f7f8;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-weight: 600;
  color: #0b4f6c;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.2, 0, 0, 1);
}
.fb-img-actions button:hover { background: #e4eef1; }
.fb-img-actions button:focus-visible { outline: 3px solid #0b4f6c; }
.fb-img-actions .fb-danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }

.fb-bar-locked .fb-bar-btn { opacity: 0.45; pointer-events: none; }
.fb-bar-locked .fb-bar-btn.fb-bar-alive {
  opacity: 1;
  pointer-events: auto;
}

#fb-owner-strip {
  background: #f0f7f8;
  color: #134e4a;
  border-bottom: 1px solid #d7e5ea;
}
.fb-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.fb-strip-copy { margin: 0; flex: 1; font-size: 0.9rem; font-weight: 600; min-width: 12rem; }
.fb-strip-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fb-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #0b4f6c;
  background: #fff;
  color: #0b4f6c;
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.2, 0, 0, 1);
}
.fb-strip-btn svg { width: 1.05rem; height: 1.05rem; }
.fb-strip-btn:hover { background: #e4eef1; }
.fb-strip-btn:focus-visible { outline: 3px solid #0b4f6c; outline-offset: 2px; }
.fb-strip-primary { background: #0b4f6c; color: #fff; }
.fb-strip-primary:hover { background: #083d54; }
.fb-strip-unlock { background: #059669; border-color: #059669; color: #fff; }
.fb-strip-unlock:hover { background: #047857; }
.fb-strip-skip {
  border: 0;
  background: none;
  color: #3d656e;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
}
.fb-strip-skip:hover { color: #0b4f6c; }
.fb-strip-skip:focus-visible { outline: 3px solid #0b4f6c; }
.fb-strip-locked { background: #fef2f2; border-bottom-color: #fecaca; }
.fb-strip-locked .fb-strip-copy { color: #7f1d1d; }
.fb-owner-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 0.85rem;
}
.fb-panel-lead { margin: 0 0 0.55rem; font-size: 0.85rem; color: #3d656e; }
.fb-owner-panel label { display: block; font-weight: 700; font-size: 0.88rem; margin-top: 0.45rem; }
.fb-owner-panel input,
.fb-owner-panel select,
.fb-owner-panel textarea {
  width: 100%;
  max-width: 28rem;
  margin-top: 0.3rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d7e5ea;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #134e4a;
}
.fb-owner-panel textarea {
  max-width: 40rem;
  min-height: 5.5rem;
  resize: vertical;
}
.fb-seo-out { margin-top: 0.75rem; }
.fb-seo-block { margin-top: 0.65rem; }
.fb-seo-block h4 { margin: 0 0 0.35rem; font-size: 0.9rem; }
.fb-seo-block ul, .fb-seo-block ol { margin: 0; padding-inline-start: 1.2rem; font-size: 0.88rem; }
.fb-owner-panel input:focus-visible,
.fb-owner-panel select:focus-visible,
.fb-owner-panel textarea:focus-visible { outline: 3px solid #0b4f6c; }
.fb-panel-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.fb-panel-status { margin: 0.45rem 0 0; font-size: 0.85rem; font-weight: 600; color: #0b4f6c; min-height: 1.2em; }

#fb-otp-gate {
  position: fixed;
  inset: 0;
  z-index: 96;
  background: rgba(11, 79, 108, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.fb-otp-card {
  background: #fff;
  color: #134e4a;
  border: 1px solid #d7e5ea;
  border-radius: 16px;
  width: min(22rem, 100%);
  padding: 1.25rem 1.2rem;
  box-shadow: 0 12px 32px rgba(10, 37, 64, 0.18);
}
.fb-otp-card h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.fb-otp-lead { margin: 0 0 0.9rem; font-size: 0.9rem; color: #3d656e; }
.fb-otp-card label { display: block; font-weight: 700; font-size: 0.9rem; margin-top: 0.65rem; }
.fb-otp-card input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #d7e5ea;
  border-radius: 8px;
  font: inherit;
}
.fb-otp-card input:focus-visible { outline: 3px solid #0b4f6c; }
.fb-otp-primary {
  width: 100%;
  margin-top: 0.65rem;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-weight: 800;
  background: #0b4f6c;
  color: #fff;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.2, 0, 0, 1);
}
.fb-otp-primary:hover { background: #083d54; }
.fb-otp-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.fb-otp-primary:focus-visible { outline: 3px solid #0b4f6c; outline-offset: 2px; }
.fb-otp-status { min-height: 1.3em; margin: 0.55rem 0 0; font-size: 0.85rem; color: #0b4f6c; }
.fb-otp-cancel {
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #3d656e;
  cursor: pointer;
  padding: 0.4rem;
}
.fb-otp-cancel:hover { color: #0b4f6c; }
.fb-otp-cancel:focus-visible { outline: 3px solid #0b4f6c; }

@media (max-width: 767px) {
  .fb-bar-btn span { display: none; }
  .fb-bar-hint { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-bar-btn, body.fb-editing .fb-img-hit, .fb-upload-btn, .fb-img-actions button, .fb-otp-primary, .fb-strip-btn { transition: none; }
}
