/* ===== Slide-over drawer for CRUD forms (Figma 447:3108 — 474px right panel) ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(16, 40, 66, .35);
  display: flex; justify-content: flex-end;
  animation: drawer-fade .2s ease;
}
@keyframes drawer-fade { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  width: 474px; max-width: 100vw; height: 100%;
  background: var(--surface);
  box-shadow: -16px 0 48px rgba(16, 40, 66, .14);
  display: flex; flex-direction: column;
  padding: 36px 40px 32px;
  overflow-y: auto;
  animation: drawer-slide .26s cubic-bezier(.4, 0, .2, 1);
}
@keyframes drawer-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }

.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}
.drawer__title { font-size: 20px; font-weight: 600; color: var(--navy); margin: 0; }
.drawer__close {
  background: none; border: 0; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px; margin: -4px -4px -4px 0; border-radius: 6px;
}
.drawer__close:hover { background: #f4f6f5; color: var(--navy); }

.drawer__body { display: flex; flex-direction: column; }

.drawer__section { margin-bottom: 22px; }
.drawer__section-title { font-size: 16px; font-weight: 600; color: var(--green); margin: 0 0 14px; }

.drawer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.drawer__field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.drawer__field--wide { grid-column: 1 / -1; }
.drawer__field > label { font-size: 13px; color: var(--text); }
.drawer__field .input { height: var(--field-h); width: 100%; }
.drawer__field .form-errors, .drawer__field ul { color: #b42318; font-size: 12px; margin: 2px 0 0; padding: 0; list-style: none; }

/* selects + date inputs render with the design chevron / calendar, like .form-field */
.drawer__field select.input {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23898b94' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.drawer__field input[type=date].input {
  appearance: none; -webkit-appearance: none; padding-left: 40px; padding-right: 36px;
  background-repeat: no-repeat; background-position: left 14px center, right 14px center;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2382bf9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23898b94' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.drawer__field input[type=date].input::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }

/* Reminder-settings checklist (Preparer drawer) */
.drawer__checks { display: grid; gap: 12px; }
.drawer__check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.drawer__check input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; border-radius: 4px; }

.drawer__foot { margin-top: auto; padding-top: 18px; }
.drawer__submit { width: 100%; }

@media (max-width: 560px) {
  .drawer { width: 100vw; padding: 24px 20px; }
  .drawer__grid { grid-template-columns: 1fr; }
}
