frontblocks-back-button.css
99 lines
| 1 | /** |
| 2 | * FrontBlocks Back Button Styles |
| 3 | * |
| 4 | * @package FrontBlocks |
| 5 | * @version 1.0.0 |
| 6 | */ |
| 7 | |
| 8 | .frbl-back-button { |
| 9 | position: fixed; |
| 10 | bottom: 24px; |
| 11 | left: 24px; |
| 12 | width: 56px; |
| 13 | height: 56px; |
| 14 | background-color: #000000; |
| 15 | border: none; |
| 16 | border-radius: 50%; |
| 17 | cursor: pointer; |
| 18 | display: flex; |
| 19 | align-items: center; |
| 20 | justify-content: center; |
| 21 | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1); |
| 22 | transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); |
| 23 | z-index: 9999; |
| 24 | opacity: 0; |
| 25 | visibility: hidden; |
| 26 | transform: scale(0.8) translateY(20px); |
| 27 | padding: 0; |
| 28 | outline: none; |
| 29 | } |
| 30 | |
| 31 | .frbl-back-button.frbl-show { |
| 32 | opacity: 1; |
| 33 | visibility: visible; |
| 34 | transform: scale(1) translateY(0); |
| 35 | } |
| 36 | |
| 37 | .frbl-back-button svg { |
| 38 | width: 24px; |
| 39 | height: 24px; |
| 40 | color: #ffffff; |
| 41 | transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); |
| 42 | } |
| 43 | |
| 44 | .frbl-back-button:hover { |
| 45 | background-color: #333333; |
| 46 | box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.1); |
| 47 | transform: scale(1.1); |
| 48 | } |
| 49 | |
| 50 | .frbl-back-button:hover svg { |
| 51 | width: 26px; |
| 52 | height: 26px; |
| 53 | } |
| 54 | |
| 55 | .frbl-back-button:active { |
| 56 | transform: scale(0.95); |
| 57 | } |
| 58 | |
| 59 | .frbl-back-button:focus-visible { |
| 60 | outline: 2px solid #4ade80; |
| 61 | outline-offset: 2px; |
| 62 | } |
| 63 | |
| 64 | /* Responsive adjustments */ |
| 65 | @media (max-width: 768px) { |
| 66 | .frbl-back-button { |
| 67 | bottom: 20px; |
| 68 | left: 20px; |
| 69 | width: 48px; |
| 70 | height: 48px; |
| 71 | } |
| 72 | |
| 73 | .frbl-back-button svg { |
| 74 | width: 20px; |
| 75 | height: 20px; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | /* Accessibility - Reduce motion */ |
| 80 | @media (prefers-reduced-motion: reduce) { |
| 81 | .frbl-back-button { |
| 82 | transition: opacity 0.1s linear, visibility 0.1s linear; |
| 83 | } |
| 84 | |
| 85 | .frbl-back-button svg { |
| 86 | transition: none; |
| 87 | } |
| 88 | |
| 89 | .frbl-back-button:hover { |
| 90 | transform: none; |
| 91 | } |
| 92 | |
| 93 | .frbl-back-button:hover svg { |
| 94 | width: 24px; |
| 95 | height: 24px; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 |