/**
 * ZED Global Consultants - Visual In-Page Editor (Elementor / WP Bakery Style)
 * Domain: www.zedglb.com
 */

/* TOP ADMIN BAR */
#zedVisualEditorBar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  background: #0b192c;
  border-bottom: 2px solid #0284c7;
  color: #ffffff;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  animation: zedSlideDown 0.3s ease;
}

@keyframes zedSlideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

body.zed-editor-active {
  padding-top: 46px !important;
}

.zed-editor-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #f8fafc;
}

.zed-badge-online {
  background: #10b981;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.zed-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.zed-bar-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.zed-bar-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.zed-bar-btn-primary {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
.zed-bar-btn-primary:hover {
  background: #0369a1 !important;
}

.zed-bar-btn-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}
.zed-bar-btn-danger:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

/* BLUE ELEMENTOR-STYLE EDIT PENCIL BADGES */
.zed-elementor-pencil {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  border-radius: 30px !important;
  padding: 5px 14px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  z-index: 9999 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.2 !important;
}

.zed-elementor-pencil:hover {
  background: #0369a1 !important;
  transform: scale(1.08) translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.6) !important;
}

.zed-elementor-pencil i {
  color: #ffffff;
  font-size: 0.85rem;
}

/* SECTION EDIT WRAPPER */
.zed-editable-section {
  position: relative;
  outline: 2px dashed transparent;
  transition: outline 0.2s ease;
}

body.zed-editor-active .zed-editable-section:hover {
  outline: 2px dashed rgba(2, 132, 199, 0.45);
}

/* FLOATING LAUNCHER (BOTTOM RIGHT) */
.zed-editor-launcher {
  position: fixed;
  bottom: 25px;
  right: 85px;
  z-index: 99990;
  background: #0284c7;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: inherit;
}

.zed-editor-launcher:hover {
  background: #0369a1;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.55);
  color: #ffffff;
}

/* QUICK EDIT IN-PAGE MODAL */
.zed-quick-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 44, 0.75);
  backdrop-filter: blur(5px);
  z-index: 100010;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: zedFadeIn 0.2s ease;
}

.zed-quick-modal-overlay.active {
  display: flex;
}

@keyframes zedFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.zed-quick-modal-window {
  background: #ffffff;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
  border: 1px solid #e2e8f0;
  font-family: inherit;
}

.zed-quick-modal-hdr {
  background: #0b192c;
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px 15px 0 0;
}

.zed-quick-modal-hdr h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.zed-quick-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.zed-quick-modal-close:hover {
  color: #ffffff;
}

.zed-quick-modal-body {
  padding: 24px;
  color: #1e293b;
}

.zed-quick-modal-body .form-group {
  margin-bottom: 18px;
}

.zed-quick-modal-body label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.zed-quick-modal-body input[type="text"],
.zed-quick-modal-body input[type="url"],
.zed-quick-modal-body input[type="email"],
.zed-quick-modal-body select,
.zed-quick-modal-body textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  box-sizing: border-box;
}

.zed-quick-modal-body input:focus,
.zed-quick-modal-body select:focus,
.zed-quick-modal-body textarea:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.zed-quick-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 0 0 15px 15px;
}

/* REAL-TIME TOAST NOTIFICATION */
#zedEditorToast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid #0284c7;
  z-index: 100020;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#zedEditorToast.active {
  transform: translateX(-50%) translateY(0);
}

/* =================================================== */
/* TRUE INLINE "CLICK-TO-TYPE" EDITING STYLES          */
/* =================================================== */

body.zed-editor-active [data-zed-inline="true"] {
  position: relative;
  outline: 1px dashed rgba(2, 132, 199, 0.45);
  outline-offset: 3px;
  cursor: text !important;
  transition: all 0.2s ease;
  border-radius: 4px;
}

body.zed-editor-active [data-zed-inline="true"]:hover {
  outline: 2px dashed #0284c7;
  background-color: rgba(2, 132, 199, 0.07);
}

body.zed-editor-active [data-zed-inline="true"]:focus {
  outline: 2px solid #0284c7 !important;
  background-color: rgba(2, 132, 199, 0.12) !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25) !important;
}

/* MODIFIED ELEMENT HIGHLIGHT */
body.zed-editor-active [data-zed-modified="true"] {
  outline: 2px solid #10b981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

/* INLINE UNSAVED BADGE IN TOP BAR */
.zed-unsaved-badge {
  background: #ea580c;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: 6px;
  animation: zedPulseBadge 1.5s infinite;
}

@keyframes zedPulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.zed-bar-btn-save {
  background: #10b981 !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}
.zed-bar-btn-save:hover {
  background: #059669 !important;
}

