/* ============================================================
   BhoomiVista — Editor Bridge v7.3
   Purpose:
     Ensures Gutenberg editor iframe visually matches
     the front-end BhoomiVista design system.
     Safe: no animations, no heavy gradients.
   ------------------------------------------------------------
   Location: /bhoomivista-css/bridge/editor-bridge.css
   ============================================================ */


/* ============================================================
   [1] CORE CONTEXT — Base Tokens for Editor Iframe
   ============================================================ */
.editor-styles-wrapper {
  --color-bg-light: #F7F1EA;
  --color-bg-dark: #0F0F0F;
  --color-text-main: #2B2B2B;
  --color-text-invert: #F7F1EA;

  --brand-primary: #B45F4B;    /* Spark copper */
  --brand-highlight: #D7B67A;  /* Golden tone */
  --brand-accent: #2A5250;     /* Deep teal */
  --brand-success: #7EB3E6;    /* Echo light blue */

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  --font-alt: 'Inter', system-ui, sans-serif;

  --radius-md: 8px;
  --radius-lg: 20px;
  --shadow-soft: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-medium: 0 4px 12px rgba(0,0,0,0.10);

  background: var(--color-bg-light);
  color: var(--color-text-main);
  font-family: var(--font-body);
  line-height: 1.6;
}


/* ============================================================
   [2] THEME PREVIEWS — Spark / Light / Echo / Terra / Freedom
   ============================================================ */

/* --- Spark Theme --- */
.editor-styles-wrapper .spark-theme {
  background: rgba(180,95,75,0.06);
  color: var(--color-text-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.editor-styles-wrapper .spark-theme::before {
  content:"";
  position:absolute;
  top:0;left:0;width:100%;height:8px;
  border-top-left-radius:var(--radius-lg);
  border-top-right-radius:var(--radius-lg);
  background: var(--brand-primary);
}

/* --- Light Theme --- */
.editor-styles-wrapper .light-theme {
  background: rgba(215,182,122,0.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.editor-styles-wrapper .light-theme::before {
  content:"";
  position:absolute;
  top:0;left:0;width:100%;height:8px;
  border-top-left-radius:var(--radius-lg);
  border-top-right-radius:var(--radius-lg);
  background: var(--brand-highlight);
}

/* --- Echo Theme --- */
.editor-styles-wrapper .echo-theme {
  background: rgba(49,94,140,0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.editor-styles-wrapper .echo-theme::before {
  content:"";
  position:absolute;
  top:0;left:0;width:100%;height:8px;
  border-top-left-radius:var(--radius-lg);
  border-top-right-radius:var(--radius-lg);
  background: #315E8C;
}

/* --- Terra Theme --- */
.editor-styles-wrapper .terra-earth {
  background: #EFE5DA;
  color: #3B332C;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.editor-styles-wrapper .terra-mist {
  background: #F4F6F8;
  color: #2E3237;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.editor-styles-wrapper .terra-night {
  background: #101214;
  color: #EDEFF2;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* --- Freedom Theme --- */
.editor-styles-wrapper .freedom-theme {
  background: rgba(42,82,80,0.06);
  color: var(--color-text-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.editor-styles-wrapper .freedom-theme::before {
  content:"";
  position:absolute;
  top:0;left:0;width:100%;height:8px;
  border-top-left-radius:var(--radius-lg);
  border-top-right-radius:var(--radius-lg);
  background: #2A5250;
}


/* ============================================================
   [3] TYPOGRAPHY + BASIC ELEMENTS
   ============================================================ */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--brand-primary);
  line-height: 1.3;
}
.editor-styles-wrapper p,
.editor-styles-wrapper li {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-main);
}

/* gradient headings shown as solid color for stability */
.editor-styles-wrapper .terra-grad,
.editor-styles-wrapper .bv-heading {
  color: var(--brand-primary);
  background: none !important;
  -webkit-text-fill-color: var(--brand-primary);
}


/* ============================================================
   [4] BLOCKS & BUTTONS (flat preview versions)
   ============================================================ */
.editor-styles-wrapper .wp-block-group,
.editor-styles-wrapper .wp-block-column {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.editor-styles-wrapper .wp-block-button__link {
  display: inline-block;
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.editor-styles-wrapper .wp-block-button__link:hover {
  background: var(--brand-highlight);
}

/* Editor view ignores animated variants */
.editor-styles-wrapper .terra-btn,
.editor-styles-wrapper .terra-hero-btn,
.editor-styles-wrapper .terra-btn-outline {
  animation: none !important;
  background: var(--brand-primary);
}


/* ============================================================
   [5] REDUCED-MOTION SAFETY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* ============================================================
   [6] NOTES
   ------------------------------------------------------------
   • Mirrors front-end variables for Gutenberg editor.
   • Animations, gradients, and parallax disabled.
   • Terra & Freedom support added (v7.3).
   • Safe for WP 6.7+ (iframe editor context).
   ============================================================ */
