/* =========================================
   XOXO SHYSHY — THE CHIT CHAT ROOM ♡
========================================= */

:root {
  --cream: #fff5f5;
  --blush: #f9e4eb;
  --soft-pink: #f4d6e1;
  --plum: #691f3d;
  --berry: #832b4e;
  --rose: #9d4265;
  --muted: #89576a;
  --border: #e6b9c9;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

/* HEADER */

.community-header {
  text-align: center;
  padding: 55px 20px 45px;
  background: linear-gradient(
    180deg,
    #f9e4eb 0%,
    #fff5f5 100%
  );
}

.community-home-link {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--berry);
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-decoration: none;
}

.community-home-link:hover {
  text-decoration: underline;
}

.community-eyebrow {
  color: var(--rose);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
}

.community-header h1 {
  margin: 12px 0;
  font-size: clamp(32px, 5vw, 52px);
  color: var(--plum);
}

.community-tagline {
  color: var(--muted);
  font-size: 15px;
}

/* MAIN PAGE LAYOUT */

.community-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 30px;
  max-width: 1150px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}

/* COMMUNITY CATEGORIES */

.community-categories {
  align-self: start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.community-categories h2 {
  font-size: 19px;
  margin: 0 0 20px;
}

.community-categories nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.community-categories nav span {
  display: block;
  background: var(--cream);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--berry);
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.community-sidebar-note {
  margin: 25px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* MAIN FEED */

.community-feed {
  min-width: 0;
}

.community-feed-header {
  margin-bottom: 25px;
}

.community-feed-header h2 {
  margin: 8px 0;
  font-size: 29px;
}

.community-feed-header > p:last-child {
  color: var(--muted);
  font-size: 14px;
}

/* CREATE DISCUSSION CARD */

.community-create-post {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 35px;
  box-shadow: 0 5px 18px rgba(105, 31, 61, 0.05);
}

.community-create-post h3 {
  font-size: 23px;
  margin: 0 0 20px;
}

#discussionForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#discussionForm label {
  margin-top: 10px;
  color: var(--berry);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
}

#discussionForm input,
#discussionForm select,
#discussionForm textarea {
  width: 100%;
  padding: 13px;
  background: #fffbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--plum);
  font-family: Arial, sans-serif;
  font-size: 14px;
}

#discussionForm textarea {
  resize: vertical;
  min-height: 130px;
}

#discussionForm input:focus,
#discussionForm select:focus,
#discussionForm textarea:focus {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.community-review-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

#discussionForm button {
  padding: 14px 20px;
  background: var(--berry);
  color: var(--white);
  border: none;
  border-radius: 30px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
}

#discussionForm button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.community-form-status {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* COMMUNITY CONVERSATIONS */

.community-posts h3 {
  font-size: 23px;
  margin-bottom: 18px;
}

#communityPosts {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 25px;
}

.community-empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* FOOTER */

.community-footer {
  text-align: center;
  padding: 30px 20px;
  background: var(--blush);
  color: var(--berry);
  font-size: 13px;
}

/* MOBILE AND TABLET */

@media (max-width: 768px) {
  .community-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .community-categories nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-header {
    padding: 35px 15px;
  }

  .community-create-post {
    padding: 20px;
  }

  .community-feed-header h2 {
    font-size: 25px;
  }
}

@media (max-width: 420px) {
  .community-categories nav {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   PUBLISHED COMMUNITY DISCUSSIONS
========================================= */

#communityPosts {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.community-discussion-card {
  background: #fff5f5;
  border: 1px solid #e6b9c9;
  border-radius: 14px;
  padding: 20px;
  overflow-wrap: anywhere;
}

.community-discussion-category {
  display: inline-block;
  color: #9d4265;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.community-discussion-card h4 {
  color: #691f3d;
  font-size: 19px;
  margin: 10px 0;
}

.community-discussion-author {
  color: #9d4265;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
}

.community-discussion-message {
  color: #744f60;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.community-discussion-date {
  display: block;
  margin-top: 15px;
  color: #987989;
  font-family: Arial, sans-serif;
  font-size: 11px;
}