/* R7 button study applied to the R6 local preview. Layout and data stay unchanged. */
:root {
  --action-radius: 11px;
  --action-height: 44px;
  --action-compact-height: 36px;
  --action-neutral: #EFE9DD;
  --action-neutral-hover: #E6DFD3;
  --action-danger-soft: #F8E8E8;
  --action-danger-hover: #F2DADA;
  --action-danger-text: #922E3C;
  --action-danger-line: #BA6870;
}
:root[data-theme=dark] {
  --action-neutral: #2D2D30;
  --action-neutral-hover: #39393D;
  --action-danger-soft: #3A252A;
  --action-danger-hover: #4A2D33;
  --action-danger-text: #F0A9AF;
  --action-danger-line: #B76B73;
}

/* Keep the existing navigation pills and icon buttons. */
:root button { border-radius: var(--action-radius); transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease; }
:root #tabs button,
:root .inbox-folders button,
:root .auth-tabs button,
:root .notification-tabs button { border-radius: 999px; }
:root .mail-row { border-radius: 0; transform: none; }
:root .theme-toggle,
:root .header-account .theme-toggle,
:root .notification-toggle,
:root .dialog-top button,
:root #close { border-radius: 50%; }
:root .header-account button:not(.theme-toggle):not(.notification-toggle),
:root .login-card > .primary { border-radius: var(--action-radius); }

/* Ordinary and dense actions use the two agreed heights. */
:root :is(#create-form,.domain-create,.settings-filters,.form-stack) button,
:root :is(.section-head,.filters,.inbox-filters,.settings-filters) button:not(.notification-toggle) { min-height: var(--action-height); }
:root :is(.bulk,.actions,.pager,.tools-pagination,.address-tools,.tools-row,.notification-head,.notification-tabs,.mailbox-more-menu,.domain-more-menu,.export-menu-options) button,
:root :is(.mailbox-more,.domain-more,.export-menu) > summary,
:root :is(.address-history-table,.settings-table,.sms-number-table,.sms-table) td button {
  box-sizing: border-box;
  min-height: var(--action-compact-height);
  border-radius: var(--action-radius);
}
:root .mailbox-list-panel .mailbox .actions button,
:root .mailbox-list-panel .address-tools button,
:root .mailbox-list-panel .bulk button,
:root #my-numbers-panel :is(.sms-number-table,.tools-pagination) button { min-height: var(--action-compact-height); }
:root .tools-back,
:root .sms-token-link,
:root .copy-address,
:root .mail-link-tools button,
:root .pager button { border-radius: var(--action-radius); }

/* The creation form has one blue action, matching the reviewed flow. */
:root #create-submit { background: var(--button-blue); border-color: var(--button-blue); color: #FFFFFF; font-weight: 600; }
:root #create-submit:hover:not(:disabled) { background: var(--button-hover); border-color: var(--button-hover); }
:root #create-random { background: var(--action-neutral); border-color: transparent; color: var(--text); }
:root #create-random:hover:not(:disabled) { background: var(--action-neutral-hover); border-color: transparent; color: var(--text); }

/* Secondary actions have visible hover and press feedback in both themes. */
:root .panel.mailbox-list-panel :is(.filters,.bulk,.mailbox .actions,.mailbox .address-tools) button:not(.primary):not(.danger):not([data-action=view-mailbox]),
:root #my-numbers-panel :is(.section-head,.tools-pagination,.sms-number-table) button:not(.primary):not(.danger) {
  background: var(--action-neutral) !important;
  color: var(--text) !important;
}
:root .panel.mailbox-list-panel :is(.filters,.bulk,.mailbox .actions,.mailbox .address-tools) button:not(.primary):not(.danger):not([data-action=view-mailbox]):hover:not(:disabled),
:root #my-numbers-panel :is(.section-head,.tools-pagination,.sms-number-table) button:not(.primary):not(.danger):hover:not(:disabled) {
  background: var(--action-neutral-hover) !important;
}
:root :is(.tools-back,.sms-token-link,.copy-address,.mail-link-tools button):hover:not(:disabled) {
  background: var(--action-neutral-hover);
}
:root button:active:not(:disabled):not(.mail-row),
:root .mailbox-list-panel button:active:not(:disabled),
:root #my-numbers-panel button:active:not(:disabled) { transform: translateY(1px); }
:root #tabs button:active:not(:disabled),
:root .inbox-folders button:active:not(:disabled),
:root .auth-tabs button:active:not(:disabled),
:root .notification-tabs button:active:not(:disabled) { transform: none; }

/* Destructive operations retain red text plus a clear action label. */
:root :is(#view-aliases,#view-inbox,#view-domains) button:is([data-action=archive],[data-action=delete-mail],[data-action=delete-domain],[data-op=archive]):not(.danger) {
  background: var(--action-danger-soft) !important;
  border-color: var(--action-danger-line) !important;
  color: var(--action-danger-text) !important;
}
:root :is(#view-aliases,#view-inbox,#view-domains) button:is([data-action=archive],[data-action=delete-mail],[data-action=delete-domain],[data-op=archive]):not(.danger):hover:not(:disabled) {
  background: var(--action-danger-hover) !important;
}
:root button:focus-visible,
:root a[role=button]:focus-visible,
:root summary[role=button]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
:root button:disabled { cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  :root button { transition: none; }
  :root button:active:not(:disabled) { transform: none; }
}
