/* =========================================================
   Guest Article Submitter — Page Template Styles
   Only loaded when a page uses gsub-template-submit/status
   Forces full-width, centered, theme-independent layout
   ========================================================= */

/* Outer wrapper replaces theme's constrained .entry-content / .container */
.gsub-template__outer {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 48px;
  background: #f8f9fb;
  min-height: 60vh;
}

/* Containers */
.gsub-template__container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}
.gsub-template__container--narrow {
  max-width: 860px; /* optimal form reading width */
}

/* Header bar above the form — clean, centered, theme-agnostic */
.gsub-template__header {
  text-align: center;
  padding: clamp(28px, 6vw, 56px) 0 clamp(20px, 4vw, 32px);
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
  border-bottom: 1px solid #eef0f3;
  margin-bottom: clamp(20px, 4vw, 32px);
}
.gsub-template__title {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.gsub-template__title::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin: 14px auto 0;
  background: #6d5cff;
  border-radius: 2px;
}
.gsub-template__subtitle {
  margin: 14px auto 0;
  max-width: 560px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
  color: #6b7280;
}

/* Content area — isolates form from theme's entry-content width hacks */
.gsub-template__content {
  width: 100%;
}

/* Force theme's content columns to full-width only on our template pages */
body.gsub-template #page,
body.gsub-template #content,
body.gsub-template .site-content,
body.gsub-template #primary,
body.gsub-template .content-area,
body.gsub-template .container,
body.gsub-template .wrapper,
body.gsub-template .site-main {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
}

/* Hide sidebars on template pages — no layout conflict (covers Astra, GP, Kadence, Divi, Avada, OceanWP) */
body.gsub-template #secondary,
body.gsub-template .sidebar,
body.gsub-template .widget-area,
body.gsub-template .site-sidebar,
body.gsub-template #sidebar,
body.gsub-template .ast-sidebar,
body.gsub-template .is-right-sidebar .widget-area,
body.gsub-template .has-sidebar .widget-area,
body.gsub-template .et_pb_widget_area,
body.gsub-template aside {
  display: none !important;
}
body.gsub-template .content-area,
body.gsub-template #primary,
body.gsub-template .site-main,
body.gsub-template .ast-separate-container .site-content,
body.gsub-template .separate-containers .site-content {
  width: 100% !important;
  flex: 1 1 100% !important;
  max-width: 100% !important;
}

/* Override Gutenberg / theme constrained layout that wraps entry-content children
   e.g. Twenty Twenty-Four: :where(.wp-site-blocks) > *, .is-layout-constrained */
body.gsub-template .entry-content > *,
body.gsub-template .wp-block-post-content > *,
body.gsub-template .is-layout-constrained > * {
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.gsub-template .entry-content,
body.gsub-template .wp-block-post-content {
  max-width: 100% !important;
  padding: 0 !important;
}

/* Inside template, the .gsub-wrapper should not add extra vertical margin — header already spaces */
.gsub-template__content .gsub-wrapper {
  margin-block: 0;
}

/* Make sure alerts/cards still look good on the subtle page background */
.gsub-template__content .gsub-card {
  border-color: #e5e7eb;
}

/* Print — header bar not needed */
@media print {
  .gsub-template__header { background: none; border: none; padding: 12px 0; }
  .gsub-template__outer { background: #fff; }
}

/* Dark mode hint: respect theme if body has dark class — keep form white for readability */
@media (prefers-color-scheme: dark) {
  body.gsub-template.dark .gsub-template__outer { background: #0f1115; }
  body.gsub-template.dark .gsub-template__header { background: linear-gradient(180deg, #1a1d23, #0f1115); border-color: #232731; }
  body.gsub-template.dark .gsub-template__title { color: #f3f4f6; }
}

/* Responsive */
@media (max-width: 640px) {
  .gsub-template__outer { padding-bottom: 24px; }
}
