.wakeup-form {
  max-width: 38rem;
  margin: 0 auto;
}
.wakeup-mode {
  padding: 0.7rem 0;
  border-bottom: 1px dashed #b5b1a680;
}
.wakeup-mode > summary {
  cursor: pointer;
  font-size: 1rem;
  padding: 0.4rem 0;
}
.wakeup-mode[open] > summary {
  color: #59745e;
}
.wakeup-mode label {
  margin-top: 0.6rem;
}
.wakeup-form input,
.wakeup-form select,
.wakeup-form textarea {
  max-width: 100%;
  box-sizing: border-box;
}
.wakeup-form fieldset {
  border: 0;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.8rem 0;
}
.wakeup-form fieldset label {
  display: flex;
  gap: 0.2rem;
}
.wakeup-switch {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
.wakeup-records {
  margin-top: 1.3rem;
}
.wakeup-records .row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}
.wakeup-records small {
  color: var(--muted, #777);
  font-size: 0.75rem;
}
.wakeup-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #26252144;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.wakeup-confirm {
  background: var(--paper, #f6f5f0);
  border-radius: 1.1rem;
  padding: 1.4rem;
  max-width: 24rem;
  box-shadow: 0 8px 30px #2222;
}
.wakeup-confirm p {
  line-height: 1.7;
}
.wakeup-confirm button {
  margin: 0.5rem;
}
.wakeup-trigger {
  display: block;
  width: 100%;
  text-align: center;
  font-size: calc(var(--chat-font-size, 16px) * 0.74);
  color: var(--muted, #777);
  background: transparent;
  border: 0;
  padding: 0.55rem 0 0.35rem;
  cursor: pointer;
  grid-column: 1/-1;
}
.wakeup-trigger:focus-visible {
  outline: 1px dashed currentColor;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .wakeup-mode[open] {
    animation: wakeup-arrive 0.25s ease-out;
  }
  .wakeup-trigger {
    animation: wakeup-arrive 0.25s ease-out;
  }
  @keyframes wakeup-arrive {
    from {
      opacity: 0.4;
      transform: translateY(2px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
[data-wakeup-root] .fineprint{font-family:inherit}
[data-wakeup-root] .permission-row .resource-name{flex:1;text-align:left}
[data-wakeup-root] .permission-row .switch{flex:0 0 72px}
.wakeup-form .wakeup-switch{display:inline-flex;vertical-align:middle;margin:.4rem 0 .8rem}

/* Selection first; hidden mode fields must remain hidden despite shared form styles. */
.wakeup-form [hidden], .wakeup-actions[hidden] { display: none !important; }
.wakeup-choice { border: 0; border-bottom: 1px dashed #b5b1a680; padding: .55rem 0; }
.wakeup-choice > summary { cursor: pointer; padding: .5rem 0; min-height: 44px; box-sizing: border-box; line-height: 1.6; overflow-wrap: anywhere; }
.wakeup-choice[open] > summary { color: #59745e; }
.wakeup-choices { max-height: 13rem; overflow-y: auto; padding: .2rem .3rem .5rem; }
.wakeup-option { display: block; width: 100%; min-height: 44px; text-align: left; padding: .6rem .5rem; border: 0; background: transparent; border-radius: .4rem; overflow-wrap: anywhere; }
.wakeup-option[aria-checked="true"] { color: #526d58; background: #879d8614; }
.wakeup-option[aria-checked="true"]::after { content: " ✓"; }
.wakeup-option:focus-visible, .wakeup-choice > summary:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .wakeup-choice[open] > .wakeup-choices, .wakeup-config { animation: wakeup-arrive .25s ease-out; } }
