/* Custom Styles for ระบบจองห้องประชุม ศปก.ตร */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Prompt:wght@400;500;600;700&display=swap');

:root {
  --police-blue-dark: #07152b;
  --police-blue-primary: #0b2545;
  --police-blue-light: #133b68;
  --police-gold: #cba135;
  --police-gold-hover: #dfb64e;
  --police-gold-light: #fef7db;
  --police-red: #b91c1c;
  --police-green: #15803d;
}

body {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Prompt', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(203, 161, 53, 0.6);
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(203, 161, 53, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* Glowing Accent Border */
.gold-glow {
  box-shadow: 0 0 15px rgba(203, 161, 53, 0.25);
}

/* Pulse animation for Live Room status */
@keyframes pulse-live {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.animate-pulse-live {
  animation: pulse-live 2s infinite ease-in-out;
}

/* Status Badges */
.badge-status-approved {
  background-color: rgba(21, 128, 61, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.badge-status-pending {
  background-color: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-status-rejected {
  background-color: rgba(185, 28, 28, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-status-in_use {
  background-color: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.badge-status-available {
  background-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.badge-status-maintenance {
  background-color: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Timeline Custom Styles */
.timeline-grid {
  display: grid;
  grid-template-columns: 160px repeat(20, minmax(60px, 1fr));
  min-width: 1360px;
}

.timeline-row-content {
  grid-column: span 20 / span 20;
  position: relative;
  display: grid;
  grid-template-columns: repeat(20, minmax(60px, 1fr));
}

.timeline-cell {
  position: relative;
  height: 64px;
  border-right: 1px dashed rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-event-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.75rem;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 10;
}

.timeline-event-block:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

/* Print official slip styling */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .no-print, header, nav, #toast-container, .modal-backdrop, .sidebar, footer {
    display: none !important;
  }
  
  #print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20mm;
    background: white;
    color: black;
    font-size: 14pt;
    line-height: 1.6;
  }

  .print-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    margin-bottom: 20px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
  }

  .print-table td, .print-table th {
    border: 1px solid #333;
    padding: 8px 12px;
  }

  .print-signature-box {
    page-break-inside: avoid;
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
  }
}

#print-area {
  display: none;
}
