/* Shared glass button theme. Use one variant class on each new filled button.
   Legacy selectors are aliases so existing and portal-rendered controls share it.
   The visual contract is important in a named layer to beat older component
   specificity without changing their dimensions, layout or interaction logic. */
:root { --button-radius: 10px; }

@layer carelto-buttons {
:where(
  .btn-primary,
  .hero-button-primary,
  .interested-button,
  .plan-button,
  .primary,
  .next-button,
  .aui-button.aui-primary,
  .image-generate,
  .chat-send,
  .pg-send,
  .send-prompt,
  .prompt-input__send,
  .prompt-bar__send,
  .help-send,
  .slide-key-handle,
  .swipe-toast__action,
  .chat-settings-drawer footer button[type="submit"],
  .btn-secondary,
  .btn-auth,
  .auth-social,
  .aui-button,
  .specular-button,
  .new-chat,
  .chat-new,
  .pg-new,
  .method,
  .amount-grid button,
  .copy-detail,
  .panel-logout,
  .model-trigger,
  .effort-trigger,
  .files-toggle,
  .help-attach,
  .help-scroll-bottom,
  .chat-icon.chat-plus,
  .playground-switch,
  .image-options button,
  .image-choice-grid button,
  .chat-settings-presets button,
  .pg-presets button,
  .pg-sysbar>button,
  .pg-syshead button,
  .pg-attaches button,
  .chat-attachments button,
  .chat-presets>div button,
  .chat-code-panel button,
  .prompt-suggestions button,
  .model-filters button,
  .ticket-priorities .ticket-priority,
  .admin-user-detail button:not(.support-icon),
  .ticket-rename button,
  .chat-delete-dialog>div:last-child button,
  .chat-settings-drawer footer button,
  .prompt-bar__pick,
  .tools-more,
  .all-tools-dialog header button,
  .btn-tertiary,
  .auth-submit,
  .hero-announcement
) {
  --glass-fill: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover-fill: rgba(255, 255, 255, 0.08);
  --glass-hover-border: rgba(255, 255, 255, 0.2);
}

:where(
  .btn-primary,
  .hero-button-primary,
  .interested-button,
  .plan-button,
  .primary,
  .next-button,
  .aui-button.aui-primary,
  .image-generate,
  .chat-send,
  .pg-send,
  .send-prompt,
  .prompt-input__send,
  .prompt-bar__send,
  .help-send,
  .slide-key-handle,
  .swipe-toast__action,
  .chat-settings-drawer footer button[type="submit"],
  .btn-secondary,
  .btn-auth,
  .auth-social,
  .aui-button,
  .specular-button,
  .new-chat,
  .chat-new,
  .pg-new,
  .method,
  .amount-grid button,
  .copy-detail,
  .panel-logout,
  .model-trigger,
  .effort-trigger,
  .files-toggle,
  .help-attach,
  .help-scroll-bottom,
  .chat-icon.chat-plus,
  .playground-switch,
  .image-options button,
  .image-choice-grid button,
  .chat-settings-presets button,
  .pg-presets button,
  .pg-sysbar>button,
  .pg-syshead button,
  .pg-attaches button,
  .chat-attachments button,
  .chat-presets>div button,
  .chat-code-panel button,
  .prompt-suggestions button,
  .model-filters button,
  .ticket-priorities .ticket-priority,
  .admin-user-detail button:not(.support-icon),
  .ticket-rename button,
  .chat-delete-dialog>div:last-child button,
  .chat-settings-drawer footer button,
  .prompt-bar__pick,
  .tools-more,
  .all-tools-dialog header button,
  .btn-tertiary,
  .auth-submit,
  .hero-announcement
) {
  background: var(--glass-fill) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--button-radius) !important;
  color: #f5f5f7 !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  letter-spacing: 0.02em !important;
  font-weight: 500 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
  transition: all 0.25s ease !important;
}

:is(.btn-primary, .hero-button-primary, .interested-button, .plan-button, .primary, .next-button, .aui-button.aui-primary, .image-generate, .chat-send, .pg-send, .send-prompt, .prompt-input__send, .prompt-bar__send, .help-send, .slide-key-handle, .swipe-toast__action, .chat-settings-drawer footer button[type="submit"]) {
  /* Primary keeps its semantic role while sharing the approved OAuth surface. */
  --glass-fill: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover-fill: rgba(255, 255, 255, 0.08);
  --glass-hover-border: rgba(255, 255, 255, 0.2);
}
:is(.btn-tertiary, .auth-submit) {
  --glass-fill: rgba(255, 255, 255, 0.02);
  --glass-hover-fill: rgba(255, 255, 255, 0.05);
}

@media (hover: hover) and (pointer: fine) {
:where(
  .btn-primary,
  .hero-button-primary,
  .interested-button,
  .plan-button,
  .primary,
  .next-button,
  .aui-button.aui-primary,
  .image-generate,
  .chat-send,
  .pg-send,
  .send-prompt,
  .prompt-input__send,
  .prompt-bar__send,
  .help-send,
  .slide-key-handle,
  .swipe-toast__action,
  .chat-settings-drawer footer button[type="submit"],
  .btn-secondary,
  .btn-auth,
  .auth-social,
  .aui-button,
  .specular-button,
  .new-chat,
  .chat-new,
  .pg-new,
  .method,
  .amount-grid button,
  .copy-detail,
  .panel-logout,
  .model-trigger,
  .effort-trigger,
  .files-toggle,
  .help-attach,
  .help-scroll-bottom,
  .chat-icon.chat-plus,
  .playground-switch,
  .image-options button,
  .image-choice-grid button,
  .chat-settings-presets button,
  .pg-presets button,
  .pg-sysbar>button,
  .pg-syshead button,
  .pg-attaches button,
  .chat-attachments button,
  .chat-presets>div button,
  .chat-code-panel button,
  .prompt-suggestions button,
  .model-filters button,
  .ticket-priorities .ticket-priority,
  .admin-user-detail button:not(.support-icon),
  .ticket-rename button,
  .chat-delete-dialog>div:last-child button,
  .chat-settings-drawer footer button,
  .prompt-bar__pick,
  .tools-more,
  .all-tools-dialog header button,
  .btn-tertiary,
  .auth-submit,
  .hero-announcement
):hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
  background: var(--glass-hover-fill) !important;
  border-color: var(--glass-hover-border) !important;
  /* Individual scale composes with slider translations and Motion transforms. */
  scale: 1.02 !important;
  box-shadow: 0 0 18px rgba(94, 234, 212, 0.08), 0 0 24px rgba(167, 139, 250, 0.07) !important;
}
}
:where(
  .btn-primary,
  .hero-button-primary,
  .interested-button,
  .plan-button,
  .primary,
  .next-button,
  .aui-button.aui-primary,
  .image-generate,
  .chat-send,
  .pg-send,
  .send-prompt,
  .prompt-input__send,
  .prompt-bar__send,
  .help-send,
  .slide-key-handle,
  .swipe-toast__action,
  .chat-settings-drawer footer button[type="submit"],
  .btn-secondary,
  .btn-auth,
  .auth-social,
  .aui-button,
  .specular-button,
  .new-chat,
  .chat-new,
  .pg-new,
  .method,
  .amount-grid button,
  .copy-detail,
  .panel-logout,
  .model-trigger,
  .effort-trigger,
  .files-toggle,
  .help-attach,
  .help-scroll-bottom,
  .chat-icon.chat-plus,
  .playground-switch,
  .image-options button,
  .image-choice-grid button,
  .chat-settings-presets button,
  .pg-presets button,
  .pg-sysbar>button,
  .pg-syshead button,
  .pg-attaches button,
  .chat-attachments button,
  .chat-presets>div button,
  .chat-code-panel button,
  .prompt-suggestions button,
  .model-filters button,
  .ticket-priorities .ticket-priority,
  .admin-user-detail button:not(.support-icon),
  .ticket-rename button,
  .chat-delete-dialog>div:last-child button,
  .chat-settings-drawer footer button,
  .prompt-bar__pick,
  .tools-more,
  .all-tools-dialog header button,
  .btn-tertiary,
  .auth-submit,
  .hero-announcement
):focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7) !important;
  outline-offset: 3px !important;
}
:where(
  .btn-primary,
  .hero-button-primary,
  .interested-button,
  .plan-button,
  .primary,
  .next-button,
  .aui-button.aui-primary,
  .image-generate,
  .chat-send,
  .pg-send,
  .send-prompt,
  .prompt-input__send,
  .prompt-bar__send,
  .help-send,
  .slide-key-handle,
  .swipe-toast__action,
  .chat-settings-drawer footer button[type="submit"],
  .btn-secondary,
  .btn-auth,
  .auth-social,
  .aui-button,
  .specular-button,
  .new-chat,
  .chat-new,
  .pg-new,
  .method,
  .amount-grid button,
  .copy-detail,
  .panel-logout,
  .model-trigger,
  .effort-trigger,
  .files-toggle,
  .help-attach,
  .help-scroll-bottom,
  .chat-icon.chat-plus,
  .playground-switch,
  .image-options button,
  .image-choice-grid button,
  .chat-settings-presets button,
  .pg-presets button,
  .pg-sysbar>button,
  .pg-syshead button,
  .pg-attaches button,
  .chat-attachments button,
  .chat-presets>div button,
  .chat-code-panel button,
  .prompt-suggestions button,
  .model-filters button,
  .ticket-priorities .ticket-priority,
  .admin-user-detail button:not(.support-icon),
  .ticket-rename button,
  .chat-delete-dialog>div:last-child button,
  .chat-settings-drawer footer button,
  .prompt-bar__pick,
  .tools-more,
  .all-tools-dialog header button,
  .btn-tertiary,
  .auth-submit,
  .hero-announcement
):is(:disabled, [aria-disabled="true"], [aria-busy="true"]) {
  opacity: 0.45 !important;
  scale: 1 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

/* Preserve selection and destructive-action meaning within the glass theme. */
:is(.amount-grid button, .method, .model-filters button, .image-options button,
    .image-choice-grid button, .chat-settings-presets button, .pg-presets button):is(.chosen, .selected, .active, [aria-pressed="true"], [data-state="active"]) {
  --glass-fill: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.4);
}
.aui-button.aui-danger, .aui-button.danger, .primary.danger {
  --glass-border: rgba(248, 113, 113, 0.55);
  --glass-hover-border: rgba(248, 113, 113, 0.8);
  color: #fecaca !important;
}
.amount-grid button span, .method small { color: #c4c4cf !important; }
.specular-button__fx { display: none; }

/* Track and traveled fill match the handle without changing pointer geometry. */
.slide-key, .checkout-slider {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.slide-key-fill { background: rgba(255, 255, 255, 0.12) !important; }
.slide-key-contrast, .slide-key-label { color: #f5f5f7 !important; }
.slide-key-handle { transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, scale 0.25s ease !important; }
.is-dragging .slide-key-handle { scale: 1 !important; }

@media (prefers-reduced-motion: reduce) {
:where(
  .btn-primary,
  .hero-button-primary,
  .interested-button,
  .plan-button,
  .primary,
  .next-button,
  .aui-button.aui-primary,
  .image-generate,
  .chat-send,
  .pg-send,
  .send-prompt,
  .prompt-input__send,
  .prompt-bar__send,
  .help-send,
  .slide-key-handle,
  .swipe-toast__action,
  .chat-settings-drawer footer button[type="submit"],
  .btn-secondary,
  .btn-auth,
  .auth-social,
  .aui-button,
  .specular-button,
  .new-chat,
  .chat-new,
  .pg-new,
  .method,
  .amount-grid button,
  .copy-detail,
  .panel-logout,
  .model-trigger,
  .effort-trigger,
  .files-toggle,
  .help-attach,
  .help-scroll-bottom,
  .chat-icon.chat-plus,
  .playground-switch,
  .image-options button,
  .image-choice-grid button,
  .chat-settings-presets button,
  .pg-presets button,
  .pg-sysbar>button,
  .pg-syshead button,
  .pg-attaches button,
  .chat-attachments button,
  .chat-presets>div button,
  .chat-code-panel button,
  .prompt-suggestions button,
  .model-filters button,
  .ticket-priorities .ticket-priority,
  .admin-user-detail button:not(.support-icon),
  .ticket-rename button,
  .chat-delete-dialog>div:last-child button,
  .chat-settings-drawer footer button,
  .prompt-bar__pick,
  .tools-more,
  .all-tools-dialog header button,
  .btn-tertiary,
  .auth-submit,
  .hero-announcement
) {
  transition: none !important;
  scale: 1 !important;
}
}
}

.btn-auth { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; line-height: 1.25; text-align: center; box-sizing: border-box; }

/* An opaque neutral edge prevents the bright aurora tinting the nav border. */
.btn-auth { --glass-border: #505054; --glass-hover-border: #707078; }

/* Solid consent action uses the shared sizing, radius and interaction theme. */
@layer carelto-buttons {
.cookie-bar.cookie-bar button.btn-primary[data-choice="accept"] { --glass-fill:#fff; --glass-hover-fill:#ececf0; --glass-border:#fff; --glass-hover-border:#ececf0; color:#141414 !important; }
}

/* Consent rejection keeps the tertiary theme with a quieter border. */
.cookie-bar [data-choice="reject"].btn-tertiary { --glass-border: rgba(255, 255, 255, 0.08); }
