/* ============================================================
   File:        post-to-board-styles.css
   Purpose:     Styles for the Post to Board submission form
                (post-to-board.html). Self-contained.
                Color theme matches bulletin-board-styles.css —
                warm cream + brick red.
   ============================================================ */


/* ── COLOR VARIABLES ──────────────────────────────────────────*/
:root {
  --cream:       #fdf8ef;
  --brick:       #8b3a2a;
  --brick-light: #d4856a;
  --brick-pale:  #f5e6e1;
  --parchment:   #f5edd8;
  --deep:        #1e1a17;
  --soft-text:   #6b5b52;
  --white:       #ffffff;
  --error:       #c0392b;
  --border:      rgba(139, 58, 42, 0.15);
}


/* ── RESET ────────────────────────────────────────────────────*/
* { box-sizing: border-box; margin: 0; padding: 0; }


/* ── BODY ─────────────────────────────────────────────────────*/
body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--cream);
  color: var(--deep);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -100px; right: -100px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, #f5e6e1 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -120px; left: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, #f5edd8 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}


/* ── NAVIGATION ───────────────────────────────────────────────*/
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(253, 248, 239, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2c3d2e;
  text-decoration: none;
}
.nav-brand span { color: #c9a84c; margin-right: 6px; }

.nav-links { display: flex; list-style: none; gap: 14px; }
.nav-links a {
  color: var(--soft-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: #2c3d2e; }
.nav-active { color: #2c3d2e !important; font-weight: 600; }

/* Dropdown menus */
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a { display: flex; align-items: center; gap: 3px; }
.nav-caret { font-size: 0.6rem; transition: transform 0.2s; display: inline-block; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: rgba(253, 248, 239, 0.98);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 14px 0 6px;
  list-style: none;
  z-index: 200;
}
.nav-has-dropdown:hover .nav-dropdown { display: block; }
.nav-has-dropdown:hover .nav-caret { transform: rotate(180deg); }
.nav-dropdown li a {
  display: block;
  padding: 7px 16px;
  font-size: 0.8rem;
  color: var(--soft-text);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.nav-dropdown li a:hover { color: #2c3d2e; background: rgba(44,61,46,0.05); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #2c3d2e;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 1100px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; inset: 0;
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 32px;
    background: rgba(253, 248, 239, 0.98);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a { font-size: 1.1rem; }
  .nav-has-dropdown > a { justify-content: center; }
  .nav-dropdown {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 4px 0 8px;
    text-align: center;
  }
  .nav-has-dropdown.open .nav-dropdown { display: block; }
  .nav-has-dropdown.open .nav-caret { transform: rotate(180deg); }
  .nav-dropdown li a { font-size: 0.95rem; padding: 6px 16px; }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}


/* ── PAGE WRAPPER ─────────────────────────────────────────────*/
.page-wrapper {
  position: relative; z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 110px 20px 60px;
}


/* ── HEADER ───────────────────────────────────────────────────*/
.header { text-align: center; margin-bottom: 28px; }

.board-icon {
  font-size: 1.8rem;
  letter-spacing: 10px;
  margin-bottom: 18px;
  display: block;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  color: var(--brick);
  line-height: 1.25;
  margin-bottom: 12px;
}
.header h1 em { font-style: italic; color: var(--brick-light); }

.subtitle {
  font-size: 0.95rem;
  color: var(--soft-text);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}


/* ── FORM CARD ────────────────────────────────────────────────*/
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 8px 40px rgba(139, 58, 42, 0.09), 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  position: relative;
}
@media (max-width: 520px) { .card { padding: 28px 20px; } }


/* ── SECTION LABEL ────────────────────────────────────────────*/
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brick);
  background: rgba(139, 58, 42, 0.07);
  border: 1px solid rgba(139, 58, 42, 0.2);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 20px;
}


/* ── DIVIDER ──────────────────────────────────────────────────*/
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}


/* ── FIELDS ───────────────────────────────────────────────────*/
.field {
  display: flex; flex-direction: column;
  gap: 6px; margin-bottom: 18px;
}
.field label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--soft-text); letter-spacing: 0.02em;
}
.req { color: var(--brick); margin-left: 2px; }
.field-hint { font-size: 0.78rem; color: var(--soft-text); margin-top: 2px; line-height: 1.5; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--soft-text); cursor: pointer; user-select: none; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brick); cursor: pointer; flex-shrink: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 18px;
}
.field-row .field { margin-bottom: 0; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: var(--deep);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--brick-light);
  box-shadow: 0 0 0 3px rgba(139, 58, 42, 0.1);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b5b52' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
select option[value=""][disabled] { color: #aaa; }


/* ── PHOTO UPLOAD ZONE ────────────────────────────────────────*/
.upload-zone {
  border: 2px dashed var(--brick-light);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(212, 133, 106, 0.06);
  transition: background 0.2s, border-color 0.2s;
}
.upload-zone:hover,
.upload-zone.drag-over {
  background: rgba(212, 133, 106, 0.16);
  border-color: var(--brick);
}
.upload-icon   { font-size: 2rem; margin-bottom: 8px; }
.upload-prompt { font-size: 0.9rem; color: var(--soft-text); line-height: 1.6; }
.upload-prompt strong { color: var(--brick); }
#photo-input   { display: none; }

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px; margin-top: 14px;
}
.photo-thumb {
  position: relative; aspect-ratio: 1;
  border-radius: 10px; overflow: hidden;
  border: 1.5px solid rgba(139, 58, 42, 0.2);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb-remove {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.photo-thumb-remove:hover { background: var(--error); }
.upload-limit { font-size: 0.78rem; color: var(--soft-text); margin-top: 8px; }


/* ── SUBMIT AREA ──────────────────────────────────────────────*/
.submit-area {
  margin-top: 32px;
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
}
.submit-btn {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--brick) 0%, var(--brick-light) 100%);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 600;
  border: none; border-radius: 12px;
  cursor: pointer; letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.15s;
}
.submit-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.error-msg {
  display: none;
  background: #fdecea; color: var(--error);
  border: 1px solid #f5b7b1;
  border-radius: 10px; padding: 12px 16px;
  font-size: 0.88rem; width: 100%; text-align: center;
}
.fine-print {
  font-size: 0.78rem; color: var(--soft-text);
  text-align: center; line-height: 1.6;
}
.fine-print a { color: var(--brick); text-decoration: underline; }


/* ── SUBMIT OVERLAY ───────────────────────────────────────────*/
.submit-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(253, 248, 239, 0.88);
  backdrop-filter: blur(3px);
  z-index: 999;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
}
.submit-overlay.visible { display: flex; }

.spinner {
  width: 52px; height: 52px;
  border: 4px solid rgba(139, 58, 42, 0.15);
  border-top-color: var(--brick);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay-status {
  font-size: 0.92rem; font-weight: 600;
  color: var(--brick); letter-spacing: 0.02em;
}


/* ── SUCCESS SCREEN ───────────────────────────────────────────*/
.success-msg { display: none; text-align: center; padding: 20px 0; }
.big-emoji {
  font-size: 4rem; margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}
.success-msg h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem; color: var(--brick); margin-bottom: 12px;
}
.success-msg p {
  font-size: 0.95rem; color: var(--soft-text);
  line-height: 1.7; max-width: 380px; margin: 0 auto;
}
.success-msg a { color: var(--brick); }


/* ── FOOTER ───────────────────────────────────────────────────*/
.footer {
  text-align: center; font-size: 0.78rem;
  color: var(--soft-text); margin-top: 28px; line-height: 1.6;
}


/* ── QUILL RICH TEXT EDITOR ───────────────────────────────── */
.rich-toolbar.ql-toolbar.ql-snow {
  border: 1px solid rgba(139,58,42,0.2);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #fdf9f7;
  padding: 6px 8px;
}
.rich-editor-area.ql-container.ql-snow {
  border: 1px solid rgba(139,58,42,0.2);
  border-radius: 0 0 8px 8px;
  background: #fff;
  min-height: 130px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
}
.rich-editor-area .ql-editor { min-height: 120px; padding: 12px 14px; }
.rich-editor-area .ql-editor.ql-blank::before { color: #bbb; font-style: italic; }

.rich-toolbar .ql-stroke { stroke: #8b3a2a; }
.rich-toolbar .ql-fill   { fill:   #8b3a2a; }
.rich-toolbar .ql-picker  { color:  #8b3a2a; }
.rich-toolbar button:hover .ql-stroke { stroke: #c9a84c; }
.rich-toolbar button:hover .ql-fill   { fill:   #c9a84c; }
.rich-toolbar button.ql-active .ql-stroke { stroke: #c9a84c; }
.rich-toolbar button.ql-active            { color:  #c9a84c; }

.rich-toolbar .ql-emoji-btn {
  font-size: 1rem; line-height: 1;
  padding: 2px 5px; cursor: pointer;
  border: none; background: none;
  border-radius: 3px; transition: background 0.15s;
  vertical-align: middle;
}
.rich-toolbar .ql-emoji-btn:hover { background: rgba(201,168,76,0.15); }

#ptb-emoji-panel {
  position: absolute; z-index: 9999;
  background: #fff;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 8px; padding: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  display: none; width: 292px;
  max-height: 230px; overflow-y: auto;
}
#ptb-emoji-panel .ep-label {
  font-size: 0.62rem; color: #aaa;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 6px; padding: 0 2px;
}
#ptb-emoji-panel .ep-btn {
  background: none; border: none;
  font-size: 1.25rem; cursor: pointer;
  padding: 3px 4px; border-radius: 4px;
  transition: background 0.12s; line-height: 1;
}
#ptb-emoji-panel .ep-btn:hover { background: rgba(201,168,76,0.18); }
