/* Custom Style for Student Attendance App */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-prompt: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sarabun: 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-family: var(--font-sarabun);
  background-color: #f8fafc;
  color: #1e293b;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-prompt);
}

/* Status Button Active States */
.status-btn {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.status-btn:active {
  transform: scale(0.95);
}

/* Specific status colors when active */
.btn-status-present.active {
  background-color: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-status-absent.active {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-status-leave.active {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn-status-late.active {
  background-color: #f97316 !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.btn-status-activity.active {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* Sticky bottom bar */
.sticky-save-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* Card hover animation */
.student-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.student-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* Status Badges */
.badge-มา {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-ขาด {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.badge-ลา {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-มาสาย {
  background-color: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.badge-กิจกรรม {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Print Styles */
@media print {
  .no-print, header, .sticky-save-bar, nav, button, input[type="text"] {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .print-only {
    display: block !important;
  }
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  th, td {
    border: 1px solid #333 !important;
    padding: 6px !important;
    font-size: 11pt !important;
  }
}
