body {
  font-family: 'Segoe UI', sans-serif;
  font-size: 15px;
  background-color: #f4f4f4;
  color: #333;
  max-width: 700px;
  margin: 50px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

h2 {
  text-align: center;
  color: #4CAF50;
  font-size: 20px;
}

label {
  font-size: 15px;
  font-weight: 600;
}

input[type="text"],
textarea,
select,
input[type="number"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

/* กล่องสำหรับ A1, A2, A3, A4 */
#a1-box,
#a2-box,
#a3-box,
#a4-box {
  background-color: #e7f3ff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* สำหรับ radio group ใน A3 */
#a3-box .radio-group {
  display: flex;
  gap: 30px;
  margin-top: 10px;
  font-size: 14px;
}

/* ให้ label ใน A4 มีขนาดเท่าหัวข้ออื่น */
#a4-box > label {
  font-size: 15px;
  font-weight: 600;
}

#a4-box label {
  font-size: 13px;
  margin-right: 10px;
}

/* สำหรับ style options ใน A4 */
#styleOptions label {
  display: inline-block;
  margin: 6px 8px 6px 0;
}

/* สำหรับช่อง Other ใน A4 */
.style-other-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* Dropdown ที่ถูก disable ใช้สีเทา */
select:disabled {
  background-color: #eee;
  color: #666;
}

.clear-btn {
  background-color: red;
  color: white;
  border: none;
  padding: 6px 14px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 13px;
}

button {
  padding: 8px 18px;
  background-color: #4CAF50;
  border: none;
  color: white;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 10px;
}

button:hover {
  background-color: #45a049;
}

.save-btn {
  background-color: #4CAF50;
  margin-left: 10px;
}

.tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  cursor: pointer;
  background: #d0d0d0;
  border: none;
  font-weight: bold;
  font-size: 14px;
  color: #222;
  transition: background 0.3s;
}

.tab-btn.active {
  background: #4CAF50;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.z-box {
  background-color: #f3fff3;
  border: 1px solid #dcefdc;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.char-count {
  font-size: 12px;
  color: #888;
  text-align: right;
  margin-top: 4px;
}

/* สำหรับ radio group ใน A3 */
.radio-group {
  display: flex;
  gap: 30px;
  margin-top: 10px;
  font-size: 14px;
}

/* สไตล์สำหรับข้อความ placeholder-inactive */
.placeholder-inactive {
  color: #999;
  font-style: italic;
  background-color: #f8f8f8;
  cursor: not-allowed;
  user-select: none;
}
