/* Global button components. Only the surrounding surface changes the secondary. */
:root,
[data-button-surface="dark"] {
    --button-secondary-text: #f0ebf8;
    --button-secondary-border: #8a7b9e;
    --button-secondary-hover: #292230;
    --button-secondary-active: #372c42;
    --button-focus: #dfd2ff;
}
[data-button-surface="light"] {
    --button-secondary-text: #30243f;
    --button-secondary-border: #756286;
    --button-secondary-hover: #e2d8ee;
    --button-secondary-active: #d5c6e5;
    --button-focus: #604589;
}
.hypr-button {
    --button-bg: var(--purple, #c7b6f5);
    --button-text: #21172e;
    --button-border: var(--purple, #c7b6f5);
    --button-hover: #dfd2ff;
    --button-active: #b8a1e8;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 46px;
    max-width: 100%;
    padding: 12px 20px;
    margin: 0;
    border: 1px solid var(--button-border);
    border-radius: var(--hypr-radius, 18px);
    background: var(--button-bg);
    color: var(--button-text);
    font-family: var(--sans, sans-serif);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.hypr-button--secondary {
    --button-bg: transparent;
    --button-text: var(--button-secondary-text);
    --button-border: var(--button-secondary-border);
    --button-hover: var(--button-secondary-hover);
    --button-active: var(--button-secondary-active);
}
.hypr-button--compact {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 10px;
    gap: 12px;
}
.hypr-button:hover {
    background: var(--button-hover);
    color: var(--button-text);
    transform: translateY(-1px);
    text-decoration: none;
}
.hypr-button:active {
    background: var(--button-active);
    transform: translateY(0);
}
.hypr-button:focus-visible {
    outline: 2px solid var(--button-focus);
    outline-offset: 4px;
}
.hypr-button:disabled,
.hypr-button[aria-disabled="true"] {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}
.hypr-icon { display:inline-block; width:20px; height:20px; flex:none; vertical-align:middle; }
.hypr-button__icon { display:inline-flex; align-items:center; justify-content:center; flex:none; line-height:1; }
.hypr-button--compact .hypr-icon { width:16px; height:16px; }
@media (max-width: 760px) {
    .hypr-button { min-height: 44px; padding: 11px 16px; font-size: 10px; }
    .hypr-button--compact { min-height: 44px; padding: 9px 13px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .hypr-button { transition: none; }
    .hypr-button:hover { transform: none; }
}

/* Text CTA: the same typography and focus treatment, without an outline. */
.hypr-button.hypr-button--ghost {
    --button-text: var(--button-secondary-text);
    padding-inline: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--button-text);
    transition: color .2s ease;
}
.hypr-button.hypr-button--ghost:hover,
.hypr-button.hypr-button--ghost:active {
    background: transparent;
    color: var(--button-focus);
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .hypr-button.hypr-button--ghost { transition: none; }
}
