/* =========================
   Blog Post Writer (bpw.css)
   Version: Full Updated
========================= */

/* Page wrapper */
.bpw-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 12px;
}

.bpw-page-title{
  text-align:center;
  font-size: 44px;
  font-weight: 800;
  margin: 10px 0 22px;
  color: #111;
}

/* Cards */
.bpw-card{
  background:#000;
  border:1px solid #cbd5e1;
  border-radius:16px;
  padding:22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.bpw-card--form{
  margin-bottom: 22px;
}

.bpw-card--output{
  margin-top: 0;
}

/* Hide output until generated */
.bpw-hidden{ display:none !important; }

/* Titles */
.bpw-title{
  margin:0 0 12px;
  color:#fff;
  font-size:22px;
  font-weight:800;
}

/* Alerts */
.bpw-alert{
  margin:10px 0 0;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  background:rgba(255,255,255,.06);
  color:#fff;
}

/* Fields */
.bpw-fields{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}

.bpw-label{
  color:#fff;
  font-size:14px;
  font-weight:700;
}

/* Base input/textarea styling (dark theme) */
.bpw-input,
.bpw-textarea{
  width:100%;
  border:1px solid rgba(255,255,255,.22);
  border-radius:12px;
  padding:14px 16px;
  font-size:16px;
  line-height: 1.4;
  background:rgba(255,255,255,.06);
  color:#fff;
  outline:none;
  box-shadow:none;
}

/* Placeholder */
.bpw-input::placeholder,
.bpw-textarea::placeholder{
  color:rgba(255,255,255,.65);
}

/* Textarea sizing */
.bpw-textarea{
  min-height:140px;
  resize:vertical;
}

/* ✅ FIX 1: Force Title input to match Keywords field (prevent theme overriding input styles) */
.bpw-card input.bpw-input{
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
}

/* Focus state (looks premium + consistent) */
.bpw-input:focus,
.bpw-textarea:focus{
  border-color: rgba(14,165,233,.85) !important;
  box-shadow: 0 0 0 4px rgba(14,165,233,.18) !important;
}

/* Button (A tag) */
.bpw-btn-link{
  margin-top: 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 22px;
  background:#0ea5e9; /* visible sky */
  color:#071019;
  font-size:16px;
  font-weight:800;
  text-decoration:none !important;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  cursor:pointer;
  user-select:none;
  width: fit-content;
}

.bpw-btn-link:hover{
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.bpw-btn-link.is-disabled,
.bpw-btn-link[aria-disabled="true"]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}

/* Spinner */
.hidden{display:none !important}
.bpw-spinner svg{width:16px;height:16px}
.opacity-25{opacity:.25}
.opacity-75{opacity:.75}
@keyframes bpw-spin{to{transform:rotate(360deg)}}
.bpw-btn-link.is-loading .bpw-spinner svg{animation:bpw-spin 1s linear infinite}

/* Output container */
.bpw-results{
  color:#fff;
}

/* Draft meta box */
.bpw-meta{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  background:rgba(255,255,255,.06);
  color:#fff;
}
.bpw-meta a{
  color:#fff;
  text-decoration:underline;
}
.bpw-meta-sep{opacity:.6}

.bpw-error{
  color:#ffb4b4;
  font-weight:700;
}

/* Ensure all content inherits white color */
#bpw-results h1,
#bpw-results h2,
#bpw-results h3,
#bpw-results h4,
#bpw-results h5,
#bpw-results h6,
#bpw-results p,
#bpw-results li,
#bpw-results a,
#bpw-results strong,
#bpw-results em{
  color:#fff;
}

#bpw-results a{
  text-decoration:underline;
}

/* =========================
   ✅ FIX 2: Output readability
========================= */

#bpw-results{
  font-size: 16px;
  line-height: 1.7;
}

#bpw-results h1{
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
  margin: 6px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

#bpw-results h2{
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
  margin: 26px 0 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}

#bpw-results h3{
  font-size: 20px;
  font-weight: 800;
  margin: 18px 0 10px;
}

#bpw-results h4{
  font-size: 18px;
  font-weight: 800;
  margin: 14px 0 8px;
}

#bpw-results h5{
  font-size: 16px;
  font-weight: 800;
  margin: 12px 0 6px;
}

#bpw-results h6{
  font-size: 15px;
  font-weight: 800;
  margin: 10px 0 6px;
}

#bpw-results p{
  margin: 0 0 12px;
  opacity: .96;
}

#bpw-results ul,
#bpw-results ol{
  margin: 10px 0 16px 22px;
  padding: 0;
}

#bpw-results li{
  margin: 8px 0;
}

#bpw-results a{
  color: #7dd3fc !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#bpw-results strong{
  font-weight: 900;
}
