| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648 |
- @use '../abstracts/variables' as v;
- @use '../abstracts/mixins' as mix;
- @use 'sass:color';
- @use 'sass:map';
- .btn {
- border: 1px solid transparent;
- border-radius: 50px;
- outline: none;
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- font-size: map.get(v.$font-sizes, 'sm');
- font-weight: map.get(v.$font-weights, 'semibold');
- display: inline-flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- text-decoration: none;
- @include mix.button-base;
- &:focus {
- @include mix.box-shadow(0 0 0 3px rgba(v.$primary, 0.2));
- outline: none;
- }
-
- &:disabled,
- &.disabled {
- opacity: 0.5;
- pointer-events: none;
- cursor: not-allowed;
- @include mix.transform(none !important);
- }
-
- &:hover:not(:disabled):not(.disabled) {
- @include mix.transform(translateY(-1px));
- @include mix.box-shadow(v.$box-shadow);
-
- @include mix.respond-to-min('md') {
- @include mix.transform(translateY(-2px));
- @include mix.box-shadow(v.$box-shadow-lg);
- }
-
- @include mix.respond-to-min('lg') {
- @include mix.transform(translateY(-3px));
- }
-
- svg, i {
- @include mix.transform(scale(1.1));
- }
- }
-
- &:active:not(:disabled):not(.disabled) {
- @include mix.transform(translateY(0));
- }
- &.btn-xs {
- padding: 0.375rem 1rem;
- font-size: map.get(v.$font-sizes, 'xs');
- border-radius: 20px;
-
- @include mix.respond-to-min('md') {
- padding: 0.5rem 1.25rem;
- font-size: map.get(v.$font-sizes, 'xs');
- border-radius: 25px;
- }
-
- @include mix.respond-to-min('lg') {
- padding: 0.5rem 1.5rem;
- font-size: map.get(v.$font-sizes, 'sm');
- border-radius: 25px;
- }
- }
-
- &.btn-sm {
- padding: 0.5rem 1.5rem;
- font-size: map.get(v.$font-sizes, 'xs');
- border-radius: 25px;
-
- @include mix.respond-to-min('md') {
- padding: 0.625rem 1.875rem;
- font-size: map.get(v.$font-sizes, 'sm');
- border-radius: 30px;
- }
-
- @include mix.respond-to-min('lg') {
- padding: 0.75rem 2.25rem;
- font-size: map.get(v.$font-sizes, 'sm');
- border-radius: 30px;
- }
- }
-
- &.btn-lg {
- padding: 1rem 2.5rem;
- font-size: map.get(v.$font-sizes, 'base');
- border-radius: 50px;
-
- @include mix.respond-to-min('md') {
- padding: 1.125rem 3.125rem;
- font-size: map.get(v.$font-sizes, 'lg');
- border-radius: 60px;
- }
-
- @include mix.respond-to-min('lg') {
- padding: 1.25rem 3.75rem;
- font-size: map.get(v.$font-sizes, 'lg');
- border-radius: 60px;
- }
-
- @include mix.respond-to-min('xl') {
- padding: 1.375rem 4rem;
- font-size: map.get(v.$font-sizes, 'xl');
- border-radius: 70px;
- }
- }
-
- &.btn-xl {
- padding: 1.125rem 3rem;
- font-size: map.get(v.$font-sizes, 'lg');
- border-radius: 60px;
-
- @include mix.respond-to-min('md') {
- padding: 1.25rem 3.5rem;
- font-size: map.get(v.$font-sizes, 'xl');
- border-radius: 70px;
- }
-
- @include mix.respond-to-min('lg') {
- padding: 1.375rem 4rem;
- font-size: map.get(v.$font-sizes, 'xl');
- border-radius: 70px;
- }
-
- @include mix.respond-to-min('xl') {
- padding: 1.5rem 4.5rem;
- font-size: map.get(v.$font-sizes, '2xl');
- border-radius: 80px;
- }
- }
- &.btn-square {
- border-radius: 0;
-
- @include mix.respond-to-min('md') {
- border-radius: 2px;
- }
- }
-
- &.btn-rounded {
- border-radius: v.$border-radius-sm;
-
- @include mix.respond-to-min('md') {
- border-radius: v.$border-radius;
- }
-
- @include mix.respond-to-min('lg') {
- border-radius: v.$border-radius-lg;
- }
- }
-
- &.btn-pill {
- border-radius: 30px;
-
- @include mix.respond-to-min('md') {
- border-radius: 40px;
- }
-
- @include mix.respond-to-min('lg') {
- border-radius: 50px;
- }
- }
-
- &.btn-circle {
- border-radius: 50%;
- }
- &.btn-block {
- width: 100%;
- display: flex;
- }
- svg, i {
- width: 14px;
- height: 14px;
- margin-right: 0.375rem;
- @include mix.transition(transform 0.3s ease);
-
- @include mix.respond-to-min('md') {
- width: 16px;
- height: 16px;
- margin-right: 0.5rem;
- }
-
- @include mix.respond-to-min('lg') {
- width: 18px;
- height: 18px;
- margin-right: 0.625rem;
- }
-
- &:last-child {
- margin-right: 0;
- margin-left: 0.375rem;
-
- @include mix.respond-to-min('md') {
- margin-left: 0.5rem;
- }
-
- @include mix.respond-to-min('lg') {
- margin-left: 0.625rem;
- }
- }
-
- &:only-child {
- margin: 0;
- }
- }
- }
- .btn-primary {
- background-color: v.$primary;
- color: v.$white;
- border-color: v.$primary;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: v.$primary-dark;
- border-color: v.$primary-dark;
- color: v.$white;
- }
-
- &:active:not(:disabled):not(.disabled) {
- background-color: color.scale(v.$primary-dark, $lightness: -10%);
- border-color: color.scale(v.$primary-dark, $lightness: -10%);
- }
- }
- .btn-secondary {
- background-color: transparent;
- color: v.$primary;
- border-color: v.$primary;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: v.$primary;
- color: v.$white;
- border-color: v.$primary;
- }
-
- &:active:not(:disabled):not(.disabled) {
- background-color: v.$primary-dark;
- border-color: v.$primary-dark;
- color: v.$white;
- }
- }
- .btn-outline {
- background-color: v.$primary-dark;
- color: v.$white;
- border-color: v.$white;
- @include mix.transition(all 0.3s ease);
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: v.$primary;
- color: v.$white;
- border-color: v.$primary;
- }
-
- &:active:not(:disabled):not(.disabled) {
- background-color: v.$primary;
- color: v.$white;
- border-color: v.$primary;
- }
- }
- .btn-ghost {
- background-color: transparent;
- color: var(--color-text-primary);
- border-color: transparent;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: transparent;
- color: v.$black;
- border-color: v.$white;
- }
-
- &:active:not(:disabled):not(.disabled) {
- background-color: rgba(v.$white, 0.1);
- border-color: rgba(v.$white, 0.5);
- }
- }
- .btn-text {
- background-color: transparent;
- color: v.$primary;
- border-color: transparent;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: rgba(v.$primary, 0.1);
- color: v.$primary;
- border-color: transparent;
- @include mix.transform(translateY(-1px));
- }
-
- &:active:not(:disabled):not(.disabled) {
- background-color: rgba(v.$primary, 0.2);
- @include mix.transform(translateY(0));
- }
- }
- .btn-get-quotes {
- @include mix.box-shadow(v.$box-shadow);
- background-color: v.$primary;
- color: v.$white;
- border-color: v.$primary;
- position: relative;
- overflow: hidden;
-
- @include mix.respond-to-max('sm') {
- padding: 0.625rem 1.75rem;
- font-size: map.get(v.$font-sizes, 'sm');
- }
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: v.$primary-dark;
- color: v.$white;
- border-color: v.$white;
- }
-
- &:active:not(:disabled):not(.disabled) {
- background-color: color.scale(v.$primary-dark, $lightness: -10%);
- border-color: v.$white;
- }
-
- &::before {
- content: '';
- position: absolute;
- top: 0;
- left: -100%;
- width: 100%;
- height: 100%;
- background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
- @include mix.transition(left 0.5s);
- }
-
- &:hover::before {
- left: 100%;
- }
- }
- .btn-icon {
- width: 2.25rem;
- height: 2.25rem;
- min-width: 2.25rem;
- padding: 0 !important;
-
- @include mix.respond-to-min('md') {
- width: 2.5rem;
- height: 2.5rem;
- min-width: 2.5rem;
- }
-
- @include mix.respond-to-min('lg') {
- width: 2.75rem;
- height: 2.75rem;
- min-width: 2.75rem;
- }
-
- @include mix.respond-to-min('xl') {
- width: 3rem;
- height: 3rem;
- min-width: 3rem;
- }
-
- &.btn-xs {
- width: 1.75rem;
- height: 1.75rem;
- min-width: 1.75rem;
-
- @include mix.respond-to-min('md') {
- width: 2rem;
- height: 2rem;
- min-width: 2rem;
- }
- }
-
- &.btn-sm {
- width: 2rem;
- height: 2rem;
- min-width: 2rem;
-
- @include mix.respond-to-min('md') {
- width: 2.25rem;
- height: 2.25rem;
- min-width: 2.25rem;
- }
- }
-
- &.btn-lg {
- width: 2.75rem;
- height: 2.75rem;
- min-width: 2.75rem;
-
- @include mix.respond-to-min('md') {
- width: 3.25rem;
- height: 3.25rem;
- min-width: 3.25rem;
- }
-
- @include mix.respond-to-min('lg') {
- width: 3.5rem;
- height: 3.5rem;
- min-width: 3.5rem;
- }
- }
-
- &.btn-xl {
- width: 3.25rem;
- height: 3.25rem;
- min-width: 3.25rem;
-
- @include mix.respond-to-min('md') {
- width: 3.75rem;
- height: 3.75rem;
- min-width: 3.75rem;
- }
-
- @include mix.respond-to-min('lg') {
- width: 4rem;
- height: 4rem;
- min-width: 4rem;
- }
- }
-
- svg, i {
- margin: 0 !important;
- width: 16px !important;
- height: 16px !important;
-
- @include mix.respond-to-min('md') {
- width: 18px !important;
- height: 18px !important;
- }
-
- @include mix.respond-to-min('lg') {
- width: 20px !important;
- height: 20px !important;
- }
- }
- }
- .btn-social {
- @extend .btn-icon;
- background-color: rgba(v.$white, 0.1);
- color: v.$black;
- border-color: transparent;
-
- &:hover:not(:disabled):not(.disabled) {
- color: v.$white;
- }
-
- &.btn-twitter:hover {
- background-color: #1da1f2;
- border-color: #1da1f2;
- }
-
- &.btn-facebook:hover {
- background-color: #4267b2;
- border-color: #4267b2;
- }
-
- &.btn-linkedin:hover {
- background-color: #0077b5;
- border-color: #0077b5;
- }
-
- &.btn-instagram:hover {
- background-color: #e4405f;
- border-color: #e4405f;
- }
-
- &.btn-youtube:hover {
- background-color: #ff0000;
- border-color: #ff0000;
- }
-
- &.btn-github:hover {
- background-color: #333;
- border-color: #333;
- }
- }
- .btn-group {
- display: inline-flex;
- vertical-align: middle;
-
- @include mix.respond-to-max('sm') {
- flex-direction: column;
- width: 100%;
-
- .btn {
- margin-left: 0 !important;
- margin-bottom: -1px;
- border-radius: v.$border-radius !important;
-
- &:not(:last-child) {
- margin-bottom: 0.5rem;
- }
- }
- }
-
- @include mix.respond-to-min('sm') {
- .btn {
- position: relative;
- flex: 1 1 auto;
-
- &:not(:first-child) {
- margin-left: -1px;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
- }
-
- &:not(:last-child) {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- }
-
- &:hover {
- z-index: 1;
- }
- }
- }
- }
- .cta-buttons {
- @include mix.respond-to-max('sm') {
- flex-direction: column !important;
- gap: map.get(v.$spacers, 2) !important;
-
- .btn {
- width: 100% !important;
- }
- }
-
- @include mix.respond-to-min('sm') {
- gap: map.get(v.$spacers, 3) !important;
- }
-
- @include mix.respond-to-min('lg') {
- gap: map.get(v.$spacers, 4) !important;
- }
- }
- .btn-success {
- background-color: #28a745;
- color: v.$white;
- border-color: #28a745;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: #218838;
- border-color: #218838;
- color: v.$white;
- }
- }
- .btn-warning {
- background-color: #ffc107;
- color: #212529;
- border-color: #ffc107;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: #e0a800;
- border-color: #e0a800;
- color: #212529;
- }
- }
- .btn-danger {
- background-color: #dc3545;
- color: v.$white;
- border-color: #dc3545;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: #c82333;
- border-color: #c82333;
- color: v.$white;
- }
- }
- .btn-light {
- background-color: v.$white;
- color: v.$primary;
- border-color: v.$white;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: color.scale(v.$white, $lightness: -10%);
- color: v.$primary;
- border-color: color.scale(v.$white, $lightness: -10%);
- }
- }
- .btn-dark {
- background-color: #212529;
- color: v.$white;
- border-color: #212529;
-
- &:hover:not(:disabled):not(.disabled) {
- background-color: #16181b;
- color: v.$white;
- border-color: #16181b;
- }
- }
- .btn-loading {
- position: relative;
- color: transparent !important;
- pointer-events: none;
-
- &::after {
- content: '';
- position: absolute;
- top: 50%;
- left: 50%;
- margin: -6px 0 0 -6px;
- width: 12px;
- height: 12px;
- border: 1px solid transparent;
- border-top-color: v.$white;
- border-radius: 50%;
- animation: btn-loading-spin 1s linear infinite;
-
- @include mix.respond-to-min('md') {
- margin: -8px 0 0 -8px;
- width: 16px;
- height: 16px;
- border-width: 2px;
- }
-
- @include mix.respond-to-min('lg') {
- margin: -10px 0 0 -10px;
- width: 20px;
- height: 20px;
- }
- }
- }
- @keyframes btn-loading-spin {
- 0% { @include mix.transform(rotate(0deg)); }
- 100% { @include mix.transform(rotate(360deg)); }
- }
|