/* Attendance indicators: the fixed Planning palette, scoped to Émargement. */
dialog.rh-em-confirmation {
  box-sizing: border-box;
  width: min(28rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1.25rem;
  border: 1px solid rgb(231 201 143 / 40%);
  border-radius: 1rem;
  background: #151e2b;
  color: #f5f7fa;
  overflow: auto;
}
dialog.rh-em-confirmation::backdrop { background: rgb(7 11 16 / 72%); }
.rh-em-confirmation h2 { margin: 0; font-size: 1.2rem; }
.rh-em-confirmation p { margin: 0.65rem 0 1.25rem; line-height: 1.5; }
.rh-em-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.rh-em-confirmation-actions button {
  padding: 0.6rem 1rem;
  border: 1px solid #4a5a70;
  border-radius: 0.45rem;
  background: #222e3d;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.rh-em-confirmation-actions button.creaso-rh-emargement-btn--primary {
  border-color: #e7c98f;
  background: #e7c98f;
  color: #121923;
}
.rh-em-confirmation-actions button:focus-visible { outline: 2px solid #e7c98f; outline-offset: 2px; }
@media print { dialog.rh-em-confirmation { display: none !important; } }

.creaso-rh-emargement-workspace .rh-em-attendance-column {
  width: 9rem;
  min-width: 9rem;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.creaso-rh-emargement-workspace .rh-em-attendance-time-column {
  width: 5.75rem;
  min-width: 5.75rem;
  white-space: normal;
}

.creaso-rh-emargement-workspace .rh-em-attendance-time-observed,
.creaso-rh-emargement-workspace .rh-em-attendance-time-linked {
  display: block;
  color: #87CEEB;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.creaso-rh-emargement-workspace .rh-em-attendance-time-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 4.75rem;
  font: inherit;
  color: inherit;
}

.creaso-rh-emargement-workspace .rh-em-attendance-time-input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.creaso-rh-emargement-workspace .rh-em-attendance-badge {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.creaso-rh-emargement-workspace .rh-em-attendance-badge--vert {
  background: #CDEFD8;
  border-color: #22A65A;
  color: #14532D;
}

.creaso-rh-emargement-workspace .rh-em-attendance-badge--jaune {
  background: #F8E5A6;
  border-color: #D5A000;
  color: #624600;
}

.creaso-rh-emargement-workspace .rh-em-attendance-badge--rose {
  background: #F1CADE;
  border-color: #D85A91;
  color: #692143;
}

.creaso-rh-emargement-workspace .rh-em-attendance-badge--gris {
  background: #D6DEE7;
  border-color: #708090;
  color: #1E293B;
}

.creaso-rh-emargement-workspace button.rh-em-attendance-badge {
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.creaso-rh-emargement-workspace button.rh-em-attendance-badge:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.creaso-rh-emargement-workspace .rh-em-attendance-source-choices {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.creaso-rh-emargement-workspace .rh-em-attendance-source-choice {
  padding: 0.3rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.creaso-rh-emargement-workspace .rh-em-attendance-source-choice--pointage { color: #87CEEB; }
.creaso-rh-emargement-workspace .rh-em-attendance-source-choice--planning { color: #E7C98F; }
.creaso-rh-emargement-workspace .rh-em-attendance-source-choice:disabled { cursor: default; opacity: 0.65; }
.creaso-rh-emargement-workspace .rh-em-attendance-source-choice:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.creaso-rh-emargement-workspace .rh-em-attendance-source-unavailable { font-size: 0.7rem; line-height: 1.35; }

.creaso-rh-emargement-workspace .rh-em-attendance-correction > td,
.creaso-rh-emargement-workspace .rh-em-attendance-review {
  padding: 0.75rem 1rem;
  border-left: 3px solid #D5A000;
  background: #F8E5A6;
  color: #624600;
  text-align: left;
  white-space: normal;
}

.creaso-rh-emargement-workspace .rh-em-attendance-review {
  margin: 0.5rem 0;
  border-radius: 4px;
}

.creaso-rh-emargement-workspace :is(.rh-em-attendance-correction, .rh-em-attendance-review) :is(h3, h4, [role="status"]) {
  margin: 0 0 0.4rem;
  color: inherit;
}

.creaso-rh-emargement-workspace .rh-em-attendance-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  line-height: 1.4;
}

@media print {
  .creaso-rh-emargement-workspace .rh-em-attendance-column,
  .creaso-rh-emargement-workspace .rh-em-attendance-legend,
  .creaso-rh-emargement-workspace .rh-em-attendance-correction,
  .creaso-rh-emargement-workspace .rh-em-attendance-review {
    display: none !important;
  }
}


@media screen {
  .creaso-rh-emargement-workspace .creaso-rh-emargement-layout {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
  }

  .creaso-rh-emargement-workspace .creaso-rh-emargement-controls {
    grid-column: auto;
    display: flex;
    flex-wrap: wrap;
  }

  .creaso-rh-emargement-workspace .creaso-rh-emargement-controls > .creaso-rh-emargement-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
  }

  .creaso-rh-emargement-workspace .creaso-rh-emargement-sidebar .creaso-rh-emargement-panel {
    padding: 8px 10px !important;
  }

  .creaso-rh-emargement-workspace .creaso-rh-emargement-preview-wrap {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .creaso-rh-emargement-workspace .creaso-rh-emargement-paper {
    width: 100%;
    margin-inline: 0;
    padding-inline: clamp(0.5rem, 2vw, 1.5rem);
  }

  .creaso-rh-emargement-workspace .creaso-rh-emargement-paper__header :is(h3, p:not(.creaso-rh-emargement-balance-strip)) {
    color: inherit !important;
  }

  .creaso-rh-emargement-workspace :is(.creaso-rh-emargement-actual-table, .creaso-rh-emargement-category-table) {
    table-layout: auto;
  }

  .creaso-rh-emargement-workspace :is(.rh-em-attendance-time-planned, .rh-em-attendance-time-draft) {
    display: block;
    margin-block-start: 0.2rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
    white-space: normal;
  }

  .creaso-rh-emargement-workspace .rh-em-attendance-time-planned {
    color: #E7C98F;
    padding: 0.2rem 0.35rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: rgb(231 201 143 / 8%);
  }

  .creaso-rh-emargement-workspace .rh-em-attendance-time-planned--applied {
    font-weight: 700;
  }

  .creaso-rh-emargement-workspace .rh-em-attendance-time-draft {
    color: #CBD5E1;
  }

  @media (max-width: 1100px) {
    .creaso-rh-emargement-workspace .creaso-rh-emargement-layout {
      grid-template-columns: minmax(0, 1fr);
    }
  }
}
