/* ============================================================
   POST CREATION & EDIT — Journal Style
   Applies to: new.html.erb and edit.html.erb
   ============================================================ */

/* Base container */
#new-post, #edit-post {
  grid-column: 1 / 3;
  max-width: 800px;
  margin: 60px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(30,30,30,0.06);
  padding: 40px 50px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#new-post:hover, #edit-post:hover {
  box-shadow: 0 12px 38px rgba(30,30,30,0.08);
  transform: translateY(-2px);
}

#new-post h1, #edit-post h1 {
  font-family: "DM Serif Text", serif;
  font-size: 2.1rem;
  color: #1e1e1e;
  margin-bottom: 28px;
  text-align: left;
}

/* Form fields */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field,
form > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 600;
  color: #1e1e1e;
  font-size: 0.95rem;
}

input[type="text"],
textarea,
select {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  background: #faf9f7;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4f39c4;
  box-shadow: 0 0 0 3px rgba(107, 76, 230, 0.15);
}

/* File inputs */
input[type="file"] {
  background: #f6f5f4;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Checkboxes */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Submit button */
input[type="submit"] {
  align-self: flex-start;
  background: #4f39c4;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

input[type="submit"]:hover {
  background: #3a28a0;
  transform: translateY(-1px);
}

/* Help text & meta description notes */
.text-sm.text-gray-500 {
  font-size: 0.85rem;
  color: rgba(30,30,30,0.55);
  margin-top: -4px;
}

/* Error styling */
div[style*="color: red"] {
  background: #fff0f0;
  border: 1px solid #d44;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
  color: #900;
}

/* Rich text editor styling */
.trix-content {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  min-height: 180px;
}

/* Links under form */
#new-post a, #edit-post a {
  color: #4f39c4;
  text-decoration: none;
  font-weight: 500;
}

#new-post a:hover, #edit-post a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  #new-post, #edit-post {
    padding: 28px 22px;
  }
}
