/* public/css/write-post.css
   ─────────────────────────────────────────────────────────
   ADMIN  →  WRITE NEW POST
   ───────────────────────────────────────────────────────── */

/* ========================================================
   0. HERO SECTION (background)
   ======================================================== */
.cms-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: url("../img/cms-hero.jpg") center/cover fixed no-repeat;
  overflow: hidden;
}
.cms-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 0;
}
.cms-hero > * { position: relative; z-index: 1; }

/* ========================================================
   1. OUTER GLASS CARD
   ======================================================== */
.content-section {
  position: relative;
  width: min(900px, 92%);
  padding: 3rem 3.25rem;
  border: 1px solid var(--glass-border, rgba(255,255,255,.18));
  border-radius: 1.25rem;
  background: var(--glass-bg, rgba(30,30,40,.55));
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 8px 24px rgb(0 0 0 /45%);
  text-align: center;
}

/* Conic gradient ring */
.content-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(89,220,225,.9),
    rgba(147,152,255,.9),
    rgba(89,220,225,.9)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .25;
  transition: opacity .35s ease;
}
.content-section:hover::before { opacity: .5; }

/* Heading */
.content-section h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.9rem, 1.45rem + 1.3vw, 2.5rem);
  line-height: 1.2;
}

/* ========================================================
   2. INNER FORM CARD
   ======================================================== */
.glass-block {
  position: relative;
  border: 1px solid var(--glass-border, rgba(255,255,255,.18));
  border-radius: 1rem;
  padding: 2rem 2.25rem;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: var(--glass-bg, rgba(30,30,40,.55));
  box-shadow: 0 6px 20px rgb(0 0 0 /40%);
}

/* Hover outline */
.glass-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
  rgba(89,220,225,.8),
  rgba(147,152,255,.8));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.glass-block:hover::before { opacity: .55; }

/* Narrow the form nicely */
.form-narrow { max-width: 640px; margin-inline: auto; }

/* ========================================================
   3. FORM ELEMENTS
   ======================================================== */
.form-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  font-weight: 600;
  color: #fff;
}

/* Inputs */
input[type="text"],
input[type="file"],
textarea {
  width: 100%;
  padding: .65rem .9rem;
  border-radius: .5rem;
  border: 1px solid var(--glass-border, rgba(255,255,255,.2));
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: .95rem;
}
input::file-selector-button {
  padding: .4rem .9rem;
  border-radius: .4rem;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
textarea {
  resize: vertical;                     /* allow manual resize too */
  font-family: var(--code-font, monospace);
  line-height: 1.55;
  min-height: 14rem;
  max-height: 60vh;
}

/* Focus ring */
input:focus,
textarea:focus {
  outline: 2px solid var(--primary, #59dce1);
  outline-offset: -1px;
}

/* ========================================================
   4. PRIMARY BUTTON
   ======================================================== */
.btn-primary {
  align-self: center;
  padding: .7rem 1.6rem;
  border-radius: .55rem;
  background: var(--primary, #59dce1);
  color: #000;
  font-weight: 600;
  letter-spacing: .03em;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgb(0 0 0 /35%);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgb(0 0 0 /45%);
}

/* ========================================================
   5. ERROR BANNER
   ======================================================== */
.error-text {
  margin: 0 0 1rem;
  color: #ff8686;
  font-weight: 600;
}

/* ========================================================
   6. STACK UTILITIES
   ======================================================== */
.stack-sm > * + * { margin-top: 1rem; }

/* ========================================================
   7. RESPONSIVE TWEAKS
   ======================================================== */
@media (max-width: 700px) {
  .content-section { padding: 2.5rem 2rem; }
  .glass-block     { padding: 1.75rem 1.75rem; }
}
@media (max-width: 500px) {
  .content-section { padding: 2rem 1.5rem; }
  .glass-block     { padding: 1.5rem 1.5rem; }
}

/* End of write-post.css */
