/* Target Path: style.css */

/* ป้องกัน Pull-to-refresh บนมือถือ */
body {
  overscroll-behavior-y: none;
}

/* Glassmorphism Classes (Light Theme - Warm Beige Tone) */
.glass-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 26, 0.12);
  box-shadow: 0 8px 32px 0 rgba(139, 92, 26, 0.04);
}

.glass-header {
  background: rgba(244, 240, 230, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 92, 26, 0.1);
}

/* Custom Scrollbar for Textarea and Card container (Light Tone) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(139, 92, 26, 0.04);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.55);
}

/* Transitions */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: rgb(99, 102, 241);
  transition: all 0.2s ease-in-out;
  transform: translateX(-50%);
}

.nav-link.active::after {
  width: 80%;
}

.nav-link:hover::after {
  width: 80%;
}

/* CSS Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* SweetAlert2 custom styles to match light beige theme */
.swal2-popup {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(139, 92, 26, 0.15) !important;
  color: #2c2a29 !important;
  font-family: 'Sarabun', sans-serif !important;
  border-radius: 1rem !important;
  box-shadow: 0 10px 30px -5px rgba(139, 92, 26, 0.1) !important;
}

.swal2-title {
  color: #1c1917 !important;
}

.swal2-html-container {
  color: #44403c !important;
}

/* Textarea height constraint */
textarea {
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  textarea {
    max-height: none;
  }
}
