.recurrence-editor {
  border: 1px solid #d8e2da;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  min-width: 0;
}
.recurrence-editor h3 {
  margin: 0 0 10px;
}
.recurrence-editor > label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.recurrence-editor input,
.recurrence-editor select {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
}
.recurrence-interval > span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.recurrence-interval input {
  width: 80px;
}
.recurrence-editor fieldset {
  margin: 10px 0;
  padding: 0;
  border: 0;
}
.recurrence-editor legend {
  margin-bottom: 8px;
}
.recurrence-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.recurrence-days label {
  position: relative;
  margin: 0 !important;
  min-width: 0;
}
.recurrence-days input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.recurrence-days span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 9px;
  background: #eef3ee;
  border: 1px solid #d8e2da;
  font-size: var(--ui-caption, 16px);
}
.recurrence-days input:checked + span {
  background: #285541;
  color: white;
}
.recurrence-days input:focus-visible + span {
  outline: 3px solid #a78935;
  outline-offset: 2px;
}
.recurrence-preview {
  font-size: var(--ui-caption, 16px);
  color: #385e4c;
  overflow-wrap: anywhere;
  margin: 10px 0 0;
}
.recurrence-error {
  color: #a62c3e;
}
.recurrence-editor [hidden] {
  display: none !important;
}
.recurrence-editor small {
  font-size: var(--ui-caption, 16px);
}
@media (max-width: 400px) {
  .recurrence-editor {
    padding: 10px;
  }
  .recurrence-days {
    gap: 3px;
  }
}

/* Personal action weekdays: one schedule shared by calendar and reminder. */
.recurrence-editor[data-quick-days='true'] .recurrence-repeat-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.recurrence-repeat-heading > label {
  margin: 0 !important;
}
.recurrence-editor .recurrence-repeat-heading fieldset {
  margin: 0;
  min-width: 0;
  flex: 0 1 360px;
}
.recurrence-repeat-heading legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.recurrence-repeat-heading .recurrence-days {
  gap: 4px;
}
.recurrence-repeat-heading .recurrence-days input {
  left: 0;
  top: 0;
  min-height: 44px;
  max-width: 100%;
  z-index: 1;
}
.recurrence-repeat-heading .recurrence-days span {
  text-transform: lowercase;
}
.recurrence-repeat-heading .recurrence-days input:checked + span {
  background: #285541;
  border-color: #285541;
  color: #fff;
}
@media (max-width: 600px) {
  .recurrence-editor .recurrence-repeat-heading fieldset {
    flex-basis: 100%;
  }
}
