// BDS Button Component Styles // Brand Design System - Scalable button component // // Naming Convention: BEM with 'bds' namespace // .bds-btn - Base button (shared layout, typography, icon animation) // .bds-btn--primary - Primary variant (solid background) // .bds-btn--secondary - Secondary variant (outline style) // .bds-btn--green - Green color theme (default) // .bds-btn--black - Black color theme // .bds-btn--tertiary - Tertiary variant (text-only style) // .bds-btn__label - Label element // .bds-btn__icon - Icon element (inherits color via currentColor) // .bds-btn--disabled - Disabled state modifier // .bds-btn--no-icon - No icon modifier // // Note: This file is imported within xrpl.scss after Bootstrap and project // variables are loaded, so $grid-breakpoints, colors, and mixins are available. // ============================================================================= // Design Tokens // ============================================================================= // Neutral Black (used across variants) $bds-btn-neutral-black: #141414; $bds-btn-neutral-black-80: rgba(20, 20, 20, 0.8); // 80% black for hover $bds-btn-neutral-black-15: rgba(20, 20, 20, 0.15); // 15% black for secondary hover // Colors - Green Primary Button $bds-btn-primary-bg: $green-300; // #21E46B - Enabled $bds-btn-primary-bg-hover: $green-200; // #70EE97 - Hover/Focus $bds-btn-primary-text: $bds-btn-neutral-black; $bds-btn-primary-focus-border: $bds-btn-neutral-black; // Colors - Black Primary Button $bds-btn-primary-black-bg: $bds-btn-neutral-black; $bds-btn-primary-black-bg-hover: $bds-btn-neutral-black-80; $bds-btn-primary-black-text: $white; // Colors - Disabled State (shared) $bds-btn-disabled-bg: $gray-200; // #E0E0E1 $bds-btn-disabled-text: $gray-500; // #838386 // Colors - Green Secondary Button $bds-btn-secondary-text: $green-400; // #0DAA3E - Enabled $bds-btn-secondary-text-hover: $green-500; // #078139 - Hover/Focus $bds-btn-secondary-bg: transparent; $bds-btn-secondary-bg-hover: $green-100; // #EAFCF1 - Hover/Focus fill $bds-btn-secondary-border: $green-400; // #0DAA3E - Enabled $bds-btn-secondary-border-hover: $green-500; // #078139 - Hover/Focus $bds-btn-secondary-disabled-text: $gray-400; // Disabled text $bds-btn-secondary-disabled-border: $gray-400; // Disabled border // Colors - Tertiary Button $bds-btn-tertiary-text: $green-400; // #0DAA3E - Enabled $bds-btn-tertiary-text-hover: $green-500; // #078139 - Hover/Focus/Active $bds-btn-tertiary-bg: transparent; $bds-btn-tertiary-focus-outline: $bds-btn-neutral-black; // #141414 - Focus outline (black) $bds-btn-tertiary-disabled-text: $gray-400; // Disabled text // Colors - Black Secondary Button $bds-btn-secondary-black-text: $bds-btn-neutral-black; $bds-btn-secondary-black-bg-hover: $bds-btn-neutral-black-15; $bds-btn-secondary-black-border: $bds-btn-neutral-black; // Colors - Black Tertiary Button $bds-btn-tertiary-black-text: $bds-btn-neutral-black; $bds-btn-tertiary-black-focus-outline: $bds-btn-neutral-black; // Spacing $bds-btn-border-radius: 100px; $bds-btn-focus-border-width: 2px; // Transitions // Motion: Duration 150ms, Custom bezier for smooth in-out feel $bds-btn-transition-duration: 150ms; $bds-btn-transition-timing: cubic-bezier(0.98, 0.12, 0.12, 0.98); // ============================================================================= // Base Button Styles // ============================================================================= // // SHARED HOVER ANIMATION: // - Background fills from bottom-to-top using ::before pseudo-element // - On unhover: background empties top-to-bottom // - Each variant defines its own ::before background-color .bds-btn { // Layout display: inline-flex; align-items: center; justify-content: center; max-height: 40px; // Typography - Label R token font-family: 'Booton', sans-serif; font-size: 16px; font-weight: 400; line-height: 23.2px; letter-spacing: 0px; white-space: nowrap; // Border border: none; border-radius: $bds-btn-border-radius; // Interaction cursor: pointer; // Required for pseudo-element background animation (shared) position: relative; overflow: hidden; z-index: 1; // Transitions (shared) transition: color $bds-btn-transition-duration $bds-btn-transition-timing, border-color $bds-btn-transition-duration $bds-btn-transition-timing, padding $bds-btn-transition-duration $bds-btn-transition-timing, gap $bds-btn-transition-duration $bds-btn-transition-timing, transform $bds-btn-transition-duration $bds-btn-transition-timing; // Background fill pseudo-element (shared structure) // Each variant sets its own background-color &::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; // Start scaled to 0 from bottom - fills bottom-to-top on hover transform: scaleY(0); transform-origin: bottom center; transition: transform $bds-btn-transition-duration $bds-btn-transition-timing; } // Hover/Focus state - animate background fill (shared) &:hover:not(:disabled):not(.bds-btn--disabled), &:focus-visible:not(:disabled):not(.bds-btn--disabled) { &::before { transform: scaleY(1); } } // Active state - reset background (shared) &:active:not(:disabled):not(.bds-btn--disabled) { &::before { transform: scaleY(0); } } // Label element &__label { flex-shrink: 0; position: relative; z-index: 1; } // Icon element (SVG container) &__icon { width: 15px; height: 14px; flex-shrink: 0; transition: opacity $bds-btn-transition-duration $bds-btn-transition-timing; color: currentColor; overflow: visible; position: relative; z-index: 1; } // Arrow horizontal line - shrinks on hover/focus &__icon-line { transform-box: fill-box; // Makes transform-origin relative to element's bounding box transform-origin: right center; transform: scaleX(1); transition: transform $bds-btn-transition-duration $bds-btn-transition-timing; } // Arrow chevron - stays visible, shifts via gap change &__icon-chevron { transition: transform $bds-btn-transition-duration $bds-btn-transition-timing; } // Hover state - shrink line for all button variants &:hover:not(:disabled):not(.bds-btn--disabled), &:focus-visible:not(:disabled):not(.bds-btn--disabled) { .bds-btn__icon-line { transform: scaleX(0); } } // --------------------------------------------------------------------------- // Responsive Typography (