/* Import Google Font (Sarabun) for better Thai typography */
@import url("https://fonts.googleapis.com/css2?family=Sarabun:wght@400;700&display=swap");

/* General Body Styles */
body {
  font-family: "Sarabun", sans-serif;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
}

/* Main container to hold the content */
.container {
  max-width: 750px;
  width: 100%;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Headings Style */
h1,
h2 {
  color: #1d2129;
  border-bottom: 2px solid #e9ebee;
  padding-bottom: 10px;
  margin-top: 0;
}

/* Form Styling */
#comment-form {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Creates space between form elements */
  margin-bottom: 30px;
}

/* Input fields and Textarea */
#name-input,
#comment-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 16px;
  font-family: "Sarabun", sans-serif;
  box-sizing: border-box; /* Ensures padding doesn't affect the width */
  transition: border-color 0.3s, box-shadow 0.3s;
}

#name-input:focus,
#comment-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

#comment-input {
  resize: vertical; /* Allow vertical resizing only */
  min-height: 120px;
}

/* Submit Button */
button[type="submit"] {
  background-color: #007bff;
  color: white;
  font-weight: bold;
  font-size: 16px;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start; /* Align button to the left */
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #0056b3;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid #e9ebee;
  margin: 20px 0;
}

/* Comments Container */
#comments-container {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Space between each comment */
}

/* Individual Comment Style (Assuming JS will create a div with class="comment") */
.comment {
  background-color: #f9f9f9;
  padding: 15px;
  border-left: 4px solid #007bff;
  border-radius: 0 8px 8px 0;
}

.comment-author {
  font-weight: bold;
  color: #0056b3;
  margin-bottom: 5px;
  font-size: 1.1em;
}

.comment-text {
  font-size: 1em;
  word-wrap: break-word; /* Prevents long words from overflowing */
}
