settings-src.css
187 lines
| 1 | /** |
| 2 | * FrontBlocks Admin Settings Styles |
| 3 | * |
| 4 | * @package FrontBlocks |
| 5 | * @author Closemarketing |
| 6 | * @copyright 2025 Closemarketing |
| 7 | */ |
| 8 | |
| 9 | @tailwind base; |
| 10 | @tailwind components; |
| 11 | @tailwind utilities; |
| 12 | |
| 13 | /* Custom WordPress Admin overrides */ |
| 14 | .frbl-settings-wrapper { |
| 15 | margin-left: -20px; |
| 16 | margin-top: -10px; |
| 17 | padding-top: 40px; |
| 18 | } |
| 19 | |
| 20 | .frbl-settings-wrapper * { |
| 21 | box-sizing: border-box; |
| 22 | } |
| 23 | |
| 24 | /* Custom toggle switch component */ |
| 25 | .frbl-toggle { |
| 26 | position: relative; |
| 27 | display: inline-flex; |
| 28 | height: 1.75rem; |
| 29 | width: 3.25rem; |
| 30 | flex-shrink: 0; |
| 31 | cursor: pointer; |
| 32 | border-radius: 9999px; |
| 33 | border: 2px solid transparent; |
| 34 | transition-property: color, background-color, border-color; |
| 35 | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| 36 | transition-duration: 200ms; |
| 37 | background-color: #d1d5db; |
| 38 | } |
| 39 | |
| 40 | .frbl-toggle:hover { |
| 41 | background-color: #9ca3af; |
| 42 | } |
| 43 | |
| 44 | .frbl-toggle:focus-within { |
| 45 | outline: 2px solid transparent; |
| 46 | outline-offset: 2px; |
| 47 | box-shadow: 0 0 0 3px rgba(104, 125, 249, 0.3); |
| 48 | } |
| 49 | |
| 50 | .frbl-toggle input { |
| 51 | position: absolute; |
| 52 | width: 1px; |
| 53 | height: 1px; |
| 54 | padding: 0; |
| 55 | margin: -1px; |
| 56 | overflow: hidden; |
| 57 | clip: rect(0, 0, 0, 0); |
| 58 | white-space: nowrap; |
| 59 | border-width: 0; |
| 60 | } |
| 61 | |
| 62 | /* Toggle background when checked */ |
| 63 | .frbl-toggle:has(input:checked) { |
| 64 | background-color: #687df9; |
| 65 | } |
| 66 | |
| 67 | .frbl-toggle:has(input:checked):hover { |
| 68 | background-color: #5565ed; |
| 69 | } |
| 70 | |
| 71 | /* Toggle dot/knob - always white */ |
| 72 | .frbl-toggle span { |
| 73 | pointer-events: none; |
| 74 | display: inline-block; |
| 75 | height: 1.25rem; |
| 76 | width: 1.25rem; |
| 77 | border-radius: 9999px; |
| 78 | background-color: #ffffff; |
| 79 | box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); |
| 80 | transform: translateX(0.125rem); |
| 81 | transition-property: transform; |
| 82 | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| 83 | transition-duration: 200ms; |
| 84 | position: relative; |
| 85 | top: 0.125rem; |
| 86 | } |
| 87 | |
| 88 | /* Move the knob when checked - keep it white */ |
| 89 | .frbl-toggle input:checked + span { |
| 90 | transform: translateX(1.5rem); |
| 91 | background-color: #ffffff; |
| 92 | } |
| 93 | |
| 94 | /* Disabled state */ |
| 95 | .frbl-toggle:has(input:disabled) { |
| 96 | opacity: 0.5; |
| 97 | cursor: not-allowed; |
| 98 | } |
| 99 | |
| 100 | .frbl-toggle:has(input:disabled):hover { |
| 101 | background-color: #d1d5db; |
| 102 | } |
| 103 | |
| 104 | /* Custom checkbox styling */ |
| 105 | .frbl-checkbox { |
| 106 | height: 1.25rem; |
| 107 | width: 1.25rem; |
| 108 | border-radius: 0.25rem; |
| 109 | border-color: #d1d5db; |
| 110 | color: #687df9; |
| 111 | transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; |
| 112 | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| 113 | transition-duration: 150ms; |
| 114 | cursor: pointer; |
| 115 | } |
| 116 | |
| 117 | .frbl-checkbox:focus { |
| 118 | outline: 2px solid transparent; |
| 119 | outline-offset: 2px; |
| 120 | box-shadow: 0 0 0 3px rgba(104, 125, 249, 0.3); |
| 121 | } |
| 122 | |
| 123 | /* Success message styling */ |
| 124 | .frbl-notice-success { |
| 125 | border-radius: 0.5rem; |
| 126 | background-color: #f0fdf4; |
| 127 | border-left-width: 4px; |
| 128 | border-color: #4ade80; |
| 129 | padding: 1rem; |
| 130 | margin-bottom: 1.5rem; |
| 131 | } |
| 132 | |
| 133 | .frbl-notice-success p { |
| 134 | font-size: 0.875rem; |
| 135 | line-height: 1.25rem; |
| 136 | color: #15803d; |
| 137 | } |
| 138 | |
| 139 | /* Info badge */ |
| 140 | .frbl-info-badge { |
| 141 | display: inline-flex; |
| 142 | align-items: center; |
| 143 | padding: 0.125rem 0.625rem; |
| 144 | border-radius: 9999px; |
| 145 | font-size: 0.75rem; |
| 146 | line-height: 1rem; |
| 147 | font-weight: 500; |
| 148 | background-color: #f3f4f6; |
| 149 | color: #1f2937; |
| 150 | } |
| 151 | |
| 152 | /* Card hover effect */ |
| 153 | .frbl-card:hover { |
| 154 | box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); |
| 155 | transition-property: box-shadow; |
| 156 | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| 157 | transition-duration: 200ms; |
| 158 | } |
| 159 | |
| 160 | /* Smooth animations */ |
| 161 | @keyframes slideIn { |
| 162 | from { |
| 163 | opacity: 0; |
| 164 | transform: translateY(10px); |
| 165 | } |
| 166 | to { |
| 167 | opacity: 1; |
| 168 | transform: translateY(0); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | .frbl-animate-slide-in { |
| 173 | animation: slideIn 0.3s ease-out; |
| 174 | } |
| 175 | |
| 176 | /* Responsive adjustments */ |
| 177 | @media (max-width: 640px) { |
| 178 | .frbl-settings-wrapper { |
| 179 | margin-left: 0; |
| 180 | } |
| 181 | |
| 182 | .frbl-settings-wrapper .tw-flex.tw-items-center.tw-justify-between { |
| 183 | @apply tw-flex-col tw-items-start tw-space-y-4; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 |