/* =========================================================
   KMT Pharma - Meeting Room Reservation Platform
   Font: El Messiri | Direction: RTL | Clean Enterprise Theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');

:root {
  --font-main: 'El Messiri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --kmt-blue: #1e40af;
  --kmt-navy: #0f172a;
  --kmt-gray-bg: #f8fafc;
  --kmt-card-bg: #ffffff;
  --kmt-border: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
}

body {
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

@keyframes popIn {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.22s ease-out forwards;
}

.animate-pop-in {
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Top Room Pill Cards (Matching Image 1) */
.room-card-pill {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
  border-right-width: 5px;
  transition: all 0.2s ease;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-card-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

/* Timeline 4-Rooms Grid (Matching Image 2) */
.timeline-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13.5px;
}

.timeline-table th {
  padding: 12px 10px;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  white-space: nowrap;
}

.timeline-table th:last-child {
  border-left: none;
}

.timeline-table td {
  padding: 8px 6px;
  height: 48px;
  border-bottom: 1px solid #edf2f7;
  border-left: 1px solid #edf2f7;
  vertical-align: middle;
}

.timeline-table td:last-child {
  border-left: none;
}

.timeline-time-col {
  width: 110px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  direction: ltr;
  text-align: center;
}

.timeline-cell-available {
  color: #0284c7;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 6px;
  font-weight: 500;
  user-select: none;
}

.timeline-cell-available:hover {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.timeline-cell-booked {
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  transition: filter 0.15s ease;
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.timeline-cell-booked:hover {
  filter: brightness(0.93);
}

/* Monthly Calendar */
.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day-box {
  min-height: 105px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.calendar-day-box:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.08);
}

.calendar-day-box.is-today {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.calendar-day-box.is-other-month {
  background: #f8fafc;
  opacity: 0.45;
}

.calendar-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.1s ease;
}

.calendar-chip:hover {
  transform: scale(1.02);
}

/* Modal Backdrops */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Custom Checkbox Pills for Equipment & Catering */
.checkbox-pill-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  user-select: none;
}

.checkbox-pill-label:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.checkbox-pill-label input:checked + span {
  color: #1d4ed8;
  font-weight: 700;
}

.checkbox-pill-label:has(input:checked) {
  background: #eff6ff;
  border-color: #3b82f6;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: popIn 0.25s ease-out;
}

.toast-success {
  background: #065f46;
  color: #ecfdf5;
}

.toast-error {
  background: #991b1b;
  color: #fef2f2;
}

.toast-info {
  background: #1e3a8a;
  color: #eff6ff;
}
