/* =========================
   TABLE
========================= */

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;

  background: #0b1120;
  color: var(--text);
}

th,
td {
  padding: 0;
  border: 1px solid var(--border);
  text-align: center;
}

th {
  padding: 7px 8px;

  background: #1e293b;
  color: var(--text);

  font-weight: 800;
}

td {
  height: 32px;
  color: #020617;
}

/* =========================
   SHIFT CELLS
========================= */

.editable-cell {
  background: var(--cell-bg);
  cursor: pointer;
}

.editable-cell:hover {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
}

.editable-cell:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
}

.celle-navn {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 100%;

  font-weight: 600;
}

.hidden-name {
  color: transparent;
}

/* =========================
   OFF CELLS
========================= */

.offcelle {
  background: #000000 !important;
  color: #ffffff !important;
}

.offcelle .celle-navn {
  color: #ffffff !important;
}

/* =========================
   DATE COLUMN
========================= */

table td:first-child {
  background: #111827;
  color: var(--text) !important;
  font-weight: 800;
}

.rod-dato {
  color: #f87171;
  font-weight: 900;
}

/* =========================
   WEEK AND TODAY MARKERS
========================= */

.uke-start td {
  border-top: 3px solid #64748b;
}

.today-row td:first-child {
  background: #1e3a8a;
}

.today-row td:first-child::before {
  content: "👉";
  margin-right: 5px;
}

/* =========================
   SYKEMARKERING
========================= */

.sykcelle {
  position: relative;
}

.sykcelle::before {
  content: "+";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  width: 16px;
  height: 16px;

  background: #d60000;
  border: 1px solid #ffffff;
  border-radius: 3px;

  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;

  box-sizing: border-box;
  pointer-events: none;
  z-index: 2;
}

.sykcelle .celle-navn {
  position: relative;
  z-index: 1;
}

/* =========================
   PLIKTVAKT – BJELLE
========================= */

.pliktcelle {
  position: relative;
}

.pliktcelle::after {
  content: "🔔";

  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 15px;
  line-height: 1;

  pointer-events: none;
  z-index: 3;
}

.pliktcelle .celle-navn {
  position: relative;
  z-index: 1;
}

/* =========================
   BILOVERSKRIFT / KJØRER FOR
========================= */

.bil-header {
  position: relative;
}

.bil-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.bil-header-name {
  display: block;
  padding: 0 28px;
  text-align: center;
}

.bil-loyve-button {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);

  width: 24px;
  height: 24px;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #64748b;
  border-radius: 5px;

  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  text-decoration: none;

  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.bil-loyve-button:hover {
  background: #334155;
  border-color: #94a3b8;
}

.bil-loyve-button:active {
  transform: translateY(-50%) scale(0.94);
}

@media (max-width: 600px) {
  .bil-header-name {
    padding: 0 22px;
  }

  .bil-loyve-button {
    right: 1px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}