/* Holiday Pop-UP Modal Styles */

/* Modal Overlay - พื้นหลังมืดทับทั้งหน้าจอ */
.holiday-modal {
  display: none; /* ซ่อนไว้ตอนเริ่มต้น */
  position: fixed;
  z-index: 99999; /* แสดงอยู่ด้านบนสุด */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7); /* พื้นหลังดำโปร่งแสง 70% */
  animation: fadeIn 0.3s ease-in;
}

/* แสดง Modal เมื่อมี class active */
.holiday-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* กล่องเนื้อหา Modal */
.holiday-modal-content {
  position: relative;
  background-color: #ffffff;
  margin: auto;
  padding: 0;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.4s ease-out;
}

/* รูปภาพภายใน Modal */
.holiday-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: contain;
}

/* ปุ่มปิด (X) */
.holiday-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  color: #333333;
  font-size: 32px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  line-height: 1;
  padding-bottom: 5px;
  z-index: 100000;
}

.holiday-close-btn:hover,
.holiday-close-btn:focus {
  background-color: #e74c3c;
  color: #ffffff;
  transform: rotate(90deg) scale(1.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Animation สำหรับการปิด */
.holiday-modal.closing {
  animation: fadeOut 0.3s ease-out;
}

/* Responsive Design */

/* Tablet และหน้าจอขนาดกลาง */
@media screen and (max-width: 768px) {
  .holiday-modal-content {
    width: 90%;
    max-width: 600px;
  }

  .holiday-close-btn {
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    font-size: 28px;
  }
}

/* Mobile และหน้าจอขนาดเล็ก */
@media screen and (max-width: 480px) {
  .holiday-modal-content {
    width: 95%;
    max-width: 100%;
    margin: 20px;
    border-radius: 8px;
  }

  .holiday-image {
    border-radius: 8px;
  }

  .holiday-close-btn {
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
}

/* ป้องกัน scroll ของ body เมื่อ modal เปิด */
body.modal-open {
  overflow: hidden;
}
