/* src/client/widgets/styles/ScheduleGrid.css */
/* Styles for ScheduleGrid widget - shift schedule grid display */

/* Fixed width for first column (Employee) - ensures consistency across both sections */
th.sticky.left-0,
td.sticky.left-0 {
  min-width: 180px !important;
  max-width: 180px !important;
  width: 180px !important;
}

/* Нечетные ячейки (дни 1, 3, 5...): наклон -45 градусов */
td.hatch-pattern:nth-child(odd),
.legend-hatch {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 156, 177, 0.09),
    rgba(255, 156, 177, 0.09) 4px,
    transparent 4px,
    transparent 8px
  ) !important;
  background-color: #ffffff !important;
  color: #9ca3af !important;
}

/* Четные ячейки (дни 2, 4, 6...): наклон 45 градусов + фоновый цвет */
td.hatch-pattern:nth-child(even) {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 156, 177, 0.09),
    rgba(255, 156, 177, 0.09) 4px,
    transparent 4px,
    transparent 8px
  ) !important;
  background-color: #ffffff !important;
  color: #9ca3af !important;
}

/* Outline for pending changes instead of ring */
/* outline-offset: -2px ensures border-r doesn't conflict with outline */
.pending-change {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

/* Highlight zone for current manager (today to +60 days) */
/* Используем box-shadow вместо background-color, чтобы цвета статусов были видны */
.highlight-zone {
  box-shadow: inset 0 0 0 1000px rgba(173, 208, 255, 0.3);
}

/* Print styles for landscape orientation */
@media print {
  @page {
    size: landscape;
    margin: 0.5cm;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Сброс скроллов */
  .overflow-x-auto {
    overflow: visible !important;
  }
  .min-w-max {
    min-width: 100% !important;
  }

  /* Disable sticky positioning for employee names */
  .sticky.left-0 {
    position: static !important;
  }

  /* Скрытие системных элементов */
  .sticky {
    position: static !important;
  }

  /* Fixed table layout for better control */
  table {
    table-layout: fixed !important;
    width: 100% !important;
    border-collapse: collapse;
  }

  /* Preserve first column width in print */
  th.sticky.left-0,
  td.sticky.left-0 {
    min-width: 180px !important;
    max-width: 180px !important;
    width: 180px !important;
  }

  /* Сжатие ячеек для Landscape */
  th, td {
    padding: 2px 1px !important;
    font-size: 8px !important;
    border: 1px solid #ddd !important;
  }

  /* Compress cell padding to fit 31 days */
  .px-2.py-2 {
    padding: 2px !important;
  }

  /* Micro font for print */
  .text-sm {
    font-size: 8px !important;
  }

  /* Hide interactive elements */
  .pending-change,
  .highlight-zone {
    box-shadow: none;
    outline: none;
  }

  /* Improve readability in print */
  th,
  td {
    border: 1px solid #ccc;
  }

  /* Hide toast notifications and modals */
  .toast,
  .modal {
    display: none !important;
  }

  /* Hide legend and search elements */
  .space-y-6 > div:last-child,
  .search-input {
    display: none !important;
  }

  h3 {
    margin-top: 10px !important;
    font-size: 12px !important;
  }
}
