/* Vera Builder — sections + editor chrome */

.vera-canvas { min-height: 40vh; }
.vera-empty { padding: 4rem 1rem; text-align: center; }
.vera-pad { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.vera-section { position: relative; }

.vera-hero {
  position: relative;
  min-height: min(70vh, 560px);
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(13, 22, 51, 0.88) 0%, rgba(30, 80, 200, 0.72) 100%),
    var(--vera-hero-image, none) center / cover no-repeat;
  border-bottom: 4px solid var(--gw-yellow, #f6c500);
}
.vera-hero__inner { padding: 4rem 1rem; max-width: 720px; }
.vera-hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gw-yellow, #f6c500);
}
.vera-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 800;
  color: #fff;
}
.vera-hero__subtitle {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  max-width: 36em;
}
.vera-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.vera-hero .gw-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }

.vera-text__heading { margin: 0 0 1.25rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.vera-text__body { max-width: 48rem; line-height: 1.7; }

.vera-image-text {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .vera-image-text { grid-template-columns: 1fr 1fr; }
  .vera-image-text--right .vera-image-text__media { order: 2; }
}
.vera-image-text__media img,
.vera-image-block__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  max-height: 420px;
}
.vera-image-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  color: #64748b;
  cursor: pointer;
}
.vera-image-block__caption {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
  text-align: center;
}

.vera-columns {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .vera-columns { grid-template-columns: repeat(3, 1fr); }
}
.vera-columns__col h3 { margin: 0 0 0.75rem; }

.vera-cta {
  background: linear-gradient(135deg, #0d1633 0%, #1e50c8 100%);
  color: #fff;
  text-align: center;
  border-top: 4px solid var(--gw-yellow, #f6c500);
}
.vera-cta__inner { max-width: 640px; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
.vera-cta h2 { margin: 0 0 0.75rem; color: inherit; }
.vera-cta p { margin: 0 0 1.5rem; opacity: 0.9; }
.vera-cta .gw-btn--primary {
  background: var(--gw-yellow, #f6c500);
  color: #0d1633;
}

.vera-posts__heading { margin: 0 0 0.5rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.vera-posts__intro { margin: 0 0 1.5rem; color: #64748b; max-width: 40rem; }
.vera-posts__grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .vera-posts__grid { grid-template-columns: repeat(3, 1fr); }
}
.vera-post-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.vera-post-card__thumb img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.vera-post-card__body { padding: 1rem 1.1rem 1.25rem; }
.vera-post-card__title { margin: 0 0 0.35rem; font-size: 1.1rem; }
.vera-post-card__title a { color: inherit; text-decoration: none; }
.vera-post-card__meta { font-size: 0.8rem; color: #64748b; margin-bottom: 0.5rem; }
.vera-post-card__excerpt { font-size: 0.92rem; color: #475569; margin-bottom: 0.85rem; }

.vera-html__preview { min-height: 2rem; margin-bottom: 0.75rem; }
.vera-html__editor-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.vera-html__editor {
  width: 100%;
  min-height: 140px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  color: #e2e8f0;
  resize: vertical;
}

/* Editor shell */
body.vera-builder-editing {
  padding-top: 64px;
  --vera-toolbar-h: 64px;
  --vera-lib-w: 240px;
}
body.vera-builder-editing.vera-library-open { padding-left: var(--vera-lib-w); }
body.vera-builder-editing .media-modal-backdrop { z-index: 1600000 !important; }
body.vera-builder-editing .media-modal { z-index: 1600010 !important; }

.vera-builder { position: relative; z-index: 100000; }
.vera-toolbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100020;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #0d1633;
  color: #fff;
  padding: 0.65rem 1rem;
  border-bottom: 3px solid var(--gw-yellow, #f6c500);
}
.admin-bar .vera-toolbar { top: 32px; }
.vera-toolbar__brand { color: var(--gw-yellow, #f6c500); }
.vera-toolbar__left,
.vera-toolbar__center,
.vera-toolbar__right { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.vera-toolbar__status { font-size: 0.8rem; color: rgba(255,255,255,.65); }
.vera-toolbar__status--dirty { color: #fbbf24; }
.vera-toolbar__status--ok { color: #86efac; }
.vera-toolbar__status--error,
.vera-toolbar__status--saving { color: #fda4af; }
.vera-toolbar__quick { display: inline-flex; gap: 0.35rem; margin-left: 0.35rem; padding-left: 0.55rem; border-left: 1px solid rgba(255,255,255,.18); }

.vera-panel {
  position: fixed;
  top: var(--vera-toolbar-h);
  bottom: 0;
  width: var(--vera-lib-w);
  background: #fff;
  border-right: 1px solid #e2e8f0;
  z-index: 100010;
  overflow: auto;
  transform: translateX(-110%);
  transition: transform .2s ease;
}
.admin-bar .vera-panel { top: calc(var(--vera-toolbar-h) + 32px); }
body.vera-library-open .vera-panel--left { transform: none; }
.vera-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: #fff;
}
.vera-lib { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.5rem 0.6rem 0.75rem; }
.vera-lib__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
}
.vera-lib__item:hover { border-color: #1e50c8; background: #f1f5f9; }
.vera-lib__item .dashicons { width: 18px; height: 18px; font-size: 18px; color: #1e50c8; }

.vera-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: rgba(255,255,255,.12);
  color: #fff;
}
.vera-btn--primary { background: var(--gw-yellow, #f6c500); color: #0d1633; }
.vera-toolbar .vera-btn--ghost { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.vera-panel .vera-btn,
.vera-section .vera-btn { background: #0d1633; color: #fff; }
.vera-toolbar__quick .vera-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
}
.vera-icon-btn {
  border: 0;
  background: rgba(255,255,255,.1);
  color: inherit;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vera-toolbar .vera-icon-btn { color: #fff; }
.vera-section .vera-icon-btn { background: #f1f5f9; color: #0d1633; }
.vera-icon-btn--danger { color: #dc2626 !important; }

body.vera-builder-editing .vera-section {
  outline: 1px dashed rgba(30, 80, 200, 0.28);
  margin: 1.25rem 0;
  padding-top: 2.25rem;
  padding-bottom: 1.25rem;
}
body.vera-builder-editing .vera-section.is-selected {
  outline: 2px solid #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.vera-section__chrome {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #2563eb;
  color: #fff;
  padding: 0.35rem 0.65rem;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
}
body.vera-builder-editing .vera-section .vera-section__chrome { display: flex; }
.vera-section__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.vera-section__actions { display: flex; gap: 0.25rem; }
.vera-section__chrome .vera-icon-btn { background: rgba(255,255,255,.18); color: #fff; }

.vera-insert-btn {
  display: none;
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 7;
}
.vera-insert-btn--after { top: auto; bottom: -14px; }
body.vera-builder-editing .vera-section .vera-insert-btn {
  display: grid;
  place-items: center;
}

body.vera-builder-editing [contenteditable="true"] {
  outline: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 4px;
  cursor: text;
}
body.vera-builder-editing [contenteditable="true"]:focus {
  outline: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.06);
}

.vera-inline-fields,
.vera-link-edit {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.8rem;
}
.vera-link-edit input,
.vera-link-edit select {
  min-width: 140px;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font: inherit;
}

.vera-canvas-empty {
  margin: 3rem auto;
  max-width: 560px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 2px dashed #94a3b8;
  border-radius: 16px;
  background: #f8fafc;
}
.vera-canvas-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.vera-canvas-empty .vera-btn { background: #0d1633; color: #fff; }
.vera-canvas-footer {
  display: none;
  justify-content: center;
  padding: 1.5rem 1rem 3rem;
}
body.vera-builder-editing .vera-canvas-footer { display: flex; }
.vera-canvas-footer .vera-btn { background: #1e50c8; color: #fff; padding: 0.75rem 1.25rem; }

@media (max-width: 1100px) {
  body.vera-builder-editing.vera-library-open { padding-left: 0; }
  .vera-toolbar__quick { display: none; }
}
