/* 🔹 ปุ่มสร้างโพสต์ใหม่ด้านนอก popup */
.create-post-button {
  background-color: #2196f3;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  margin: 20px auto;
  display: block;
  transition: opacity 0.2s ease;
}

.create-post-button:hover {
  opacity: 0.9;
}

/* 🔹 กล่อง popup */
.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 🔹 เนื้อหา popup */
.popup-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: scale(0.7);
  animation: popupFade 0.4s ease forwards;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

@keyframes popupFade {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 🔹 ช่องพิมพ์ข้อความ */
.popup-content textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 15px;
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #90caf9;
  box-shadow: inset 2px 2px 5px #e0e0e0;
}

/* 🔹 ปุ่มเลือกไฟล์แบบ label */
.file-upload-label {
  display: inline-block;
  padding: 10px 20px;
  font-size: 15px;
  border-radius: 25px;
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-bottom: 15px;
}

.file-upload-label:hover {
  background-color: #43a047;
  transform: scale(1.03);
}

.file-upload-label input[type="file"] {
  display: none;
}

/* 🔹 พื้นที่แสดงรูป preview */
.image-preview-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.image-preview-container img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* 🔹 กล่องปุ่มใน popup */
.popup-buttons {
  display: flex;
  flex-direction: column; /* ✅ เรียงปุ่มแนวตั้ง */
  gap: 12px;              /* ✅ ระยะห่างระหว่างปุ่ม */
  margin-top: 20px;
}

/* 🔹 ปุ่มทั้งหมดใน popup */
.popup-buttons button {
  width: 100%;            /* ✅ ปุ่มเต็มความกว้างกล่อง */
  padding: 14px 0;        /* ✅ เพิ่มความสูงของปุ่ม */
  font-size: 18px;        /* ✅ ขนาดตัวอักษรใหญ่ขึ้น */
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* 🔹 ปุ่มโพสต์ */
.popup-buttons button[type="submit"] {
  background-color: #2196f3;
  color: white;
}

/* 🔹 ปุ่มยกเลิก */
.popup-buttons button[type="button"] {
  background-color: #e0e0e0;
  color: #333;
}

/* 🔹 เอฟเฟกต์ hover */
.popup-buttons button:hover {
  opacity: 0.95;
  transform: scale(1.02);
}