/* ============================================================
   BILLING DASHBOARD — C1 STYLE
   Clean, modern, Stripe-like layout with NxtTrail branding
============================================================ */

.billing-wrapper {
  max-width: 980px;
  margin: 0 auto;
}

.billing-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--hero);
}

.billing-sub {
  color: #666;
  margin-top: 4px;
  margin-bottom: 26px;
  font-size: 15px;
}

.billing-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 26px;
}

.billing-card {
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.billing-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--hero);
  margin-bottom: 14px;
}

.billing-plan-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 14px;
}

.billing-feature-list {
  margin-left: 16px;
  margin-bottom: 18px;
}

.billing-feature-list li {
  margin-bottom: 6px;
}

.billing-renew {
  font-size: 15px;
  color: #444;
}

.actions-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.billing-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  transition: 0.2s ease;
  border: 1px solid var(--border);
}

.billing-btn:hover {
  background: #f1f1f1;
}

.billing-btn.primary {
  background: var(--brand);
  color: #fff;
  border: none;
}

.billing-btn.primary:hover {
  background: var(--brand-dark);
}

.billing-btn.danger {
  background: #e53935;
  color: #fff;
}

.billing-btn.danger:hover {
  background: #c62828;
}

/* Mobile */
@media (max-width: 900px) {
  .billing-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   NXTTRAIL — PAGE BUILDER SUBTABS (Clean, Button-Style Tabs)
============================================================ */

.page-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.page-tab {
  padding: 10px 18px;
  background: #e8edf6;
  color: var(--hero);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  border: none;
}

.page-tab:hover {
  background: #d7dff0;
}

.page-tab.active {
  background: var(--hero);
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* ============================================================
   BRAND STORY — Generate Button
   Matches NxtTrail primary action styling
============================================================ */

#generateBrandStory {
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
  margin-top: 14px;
}

/* Hover + focus */
#generateBrandStory:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

/* Optional: Add a subtle shadow to match cards */
#generateBrandStory {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

#generateBrandStory:active {
  transform: translateY(0px);
  box-shadow: none;
}

/* ============================================================
   BLOG PREVIEW PANEL — NxtTrail Branded
============================================================ */

.blog-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.blog-preview-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--hero);
}

#blogPreviewStyle {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.blog-preview-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  max-height: 70vh;
}

/* =====================
   STYLE: EDITORIAL
===================== */
.preview-editorial h1,
.preview-editorial h2,
.preview-editorial h3 {
  font-family: Georgia, serif;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--hero);
}

.preview-editorial p {
  font-family: Georgia, serif;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* =====================
   STYLE: MARKETING
===================== */
.preview-marketing h1,
.preview-marketing h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--hero);
  margin-bottom: 12px;
}

.preview-marketing p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.preview-marketing strong {
  color: var(--brand);
}

/* =====================
   STYLE: GUTENBERG
===================== */
.preview-gutenberg h1,
.preview-gutenberg h2 {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--hero);
}

.preview-gutenberg p {
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ---------------------------------------------
   BLOG BUILDER — BUTTONS
--------------------------------------------- */
.blog-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.blog-btn {
  padding: 12px 18px;
  background: var(--hero);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s ease;
  box-shadow: var(--shadow);
}

.blog-btn:hover {
  background: var(--brand);
  transform: translateY(-2px);
}

.blog-btn.secondary {
  background: #e5e7eb;
  color: #111;
}

.blog-btn.secondary:hover {
  background: #d4d4d4;
}

.blog-btn.danger {
  background: #b91c1c;
}

.blog-btn.danger:hover {
  background: #7f1d1d;
}
.blog-preview-box {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 60vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.55;
}

.seo-score-panel {
  margin-top: 20px;
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.seo-score-panel h3 {
  margin-bottom: 12px;
  color: var(--hero);
}

.seo-score-good {
  color: #059669;
}

.seo-score-warn {
  color: #d97706;
}

.seo-score-bad {
  color: #dc2626;
}

/* ============================================================
   BLOG BUILDER — FULLY SCOPED & OVERRIDE-PROOF
   Target only elements inside .blog-builder
============================================================ */

.blog-builder * {
  box-sizing: border-box;
}

/* Page layout */
.blog-builder .workspace-main {
  padding: 24px 28px !important;
}

.blog-builder h2.section-title {
  margin-bottom: 8px !important;
}

.blog-builder .small-note {
  margin-bottom: 20px !important;
  display: block;
}

/* Tabs */
.blog-builder .blog-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.blog-builder .blog-tab {
  padding: 10px 16px;
  background: #e7eaf3;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  color: #333;
}

.blog-builder .blog-tab:hover {
  background: #d8dcec;
}

.blog-builder .blog-tab.active {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  border-color: var(--brand-dark);
}

/* Step Panels */
.blog-builder #blogStepPanel {
  margin-top: 10px;
}

.blog-builder textarea,
.blog-builder input,
.blog-builder select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  resize: vertical;
  font-size: 15px;
}

/* Action buttons */
.blog-builder .blog-action-btn,
.blog-builder .blog-generate-btn {
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
  margin-bottom: 16px;
}

.blog-builder .blog-action-btn:hover,
.blog-builder .blog-generate-btn:hover {
  background: var(--brand-dark);
}

/* Preview box */
.blog-builder .preview-box {
  background: #fff;
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 12px;
  min-height: 140px;
  box-shadow: var(--shadow);
  white-space: pre-wrap;
}

/* Tier badge */
.blog-builder .tier-badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}
