/* COMMENTS */
/* Comments wrapper */
.comments-area {
  margin: 1rem 0;
  padding: 1.5rem;
  background: var(--card-color, #fff);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Comment title */
.comments-area h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--font-color, #333);
}

/* Comment list */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list li {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--card-color);
}

/* Comment metadata */
.comment-author {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.comment-metadata {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

/* Comment form wrapper */
.comment-form-wrapper {
  margin-top: 2rem;
  padding: 1rem;
}

/* Labels */
.comment-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Inputs and textarea */
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  margin-bottom: 1rem;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Submit button */
.comment-form input[type="submit"] {
  background: var(--primary-color);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  transition: background 0.3s;
}

.comment-form input[type="submit"]:hover {
  background: var(--secondary-color);
}

/* === Cookie consent: checkbox + label left-aligned, responsive === */
#comments .comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
  width: 100%;
  box-sizing: border-box;
  text-align: left;

  flex-wrap: nowrap;   /* ❌ prevent checkbox + label from splitting lines */
}

#comments .comment-form .comment-form-cookies-consent input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0.18rem 0 0 0;
  width: auto;
  height: auto;
}

#comments .comment-form .comment-form-cookies-consent label {
  flex: 1 1 auto;      /* let label shrink and wrap internally */
  min-width: 0;        /* ✅ allows proper text wrapping inside flex */
  margin: 0;
  display: block;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
}

/* Optional safety net: on ultra-narrow screens, stack them */
@media (max-width: 360px) {
  #comments .comment-form .comment-form-cookies-consent {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* --------------------
   Responsive layout
-------------------- */

/* On wider screens, put Name & Email side by side */
@media (min-width: 600px) {
  .comment-form p.comment-form-author,
  .comment-form p.comment-form-email {
    width: 48%;
    float: left;
  }

  .comment-form p.comment-form-author {
    margin-right: 4%;
  }

  /* Clear floats for the rest */
  .comment-form p {
    clear: none;
  }
  .comment-form p:not(.comment-form-author):not(.comment-form-email) {
    clear: both;
  }

}

/* COMMENTS */
.input-box form {
  display: flex;
  gap: 8px; /* space between inputs */
}

.input-box input[type="email"] {
  flex: 1; /* email input expands to take space */
  padding: 8px;
}

.input-box input[type="submit"] {
  padding: 8px 16px;
  cursor: pointer;
  background: var(--primary-color);
  color: var(--bg-color);
  border: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.input-box input[type="submit"]:hover {
  background: var(--secondary-color);
  color: #fff;
}
