| 1 |
/* ============================================================ |
| 2 |
Flip Card — style.css |
| 3 |
Blockenberg plugin |
| 4 |
============================================================ */ |
| 5 |
|
| 6 |
/* ── Scene wrapper (alignment) ──────────────────────────── */ |
| 7 |
.bkbg-fc-scene { |
| 8 |
display: flex; |
| 9 |
width: 100%; |
| 10 |
} |
| 11 |
|
| 12 |
/* ── Outer: perspective container ───────────────────────── */ |
| 13 |
.bkbg-fc-outer { |
| 14 |
width: var(--bkbg-fc-w, 280px); |
| 15 |
height: var(--bkbg-fc-h, 320px); |
| 16 |
perspective: 1000px; |
| 17 |
cursor: pointer; |
| 18 |
box-sizing: border-box; |
| 19 |
} |
| 20 |
|
| 21 |
/* Click-trigger: no special cursor difference needed */ |
| 22 |
/* .bkbg-fc-outer:focus { |
| 23 |
outline: 2px solid #3b82f6; |
| 24 |
outline-offset: 3px; |
| 25 |
} */ |
| 26 |
|
| 27 |
/* ── Inner: the actual flipping element ─────────────────── */ |
| 28 |
.bkbg-fc-inner { |
| 29 |
width: 100%; |
| 30 |
height: 100%; |
| 31 |
position: relative; |
| 32 |
transform-style: preserve-3d; |
| 33 |
transition: transform var(--bkbg-fc-speed, 500ms) ease; |
| 34 |
border-radius: var(--bkbg-fc-radius, 16px); |
| 35 |
box-shadow: var(--bkbg-fc-shadow, 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06)); |
| 36 |
} |
| 37 |
|
| 38 |
/* ── Hover trigger ──────────────────────────────────────── */ |
| 39 |
.bkbg-fc-outer[data-flip-trigger="hover"]:hover .bkbg-fc-inner, |
| 40 |
.bkbg-fc-outer[data-flip-trigger="hover"]:focus .bkbg-fc-inner { |
| 41 |
transform: rotateY(180deg); |
| 42 |
} |
| 43 |
|
| 44 |
.bkbg-fc-outer[data-flip-dir="vertical"][data-flip-trigger="hover"]:hover .bkbg-fc-inner, |
| 45 |
.bkbg-fc-outer[data-flip-dir="vertical"][data-flip-trigger="hover"]:focus .bkbg-fc-inner { |
| 46 |
transform: rotateX(180deg); |
| 47 |
} |
| 48 |
|
| 49 |
/* ── Click trigger (JS adds data-flipped) ───────────────── */ |
| 50 |
.bkbg-fc-outer[data-flip-trigger="click"][data-flipped="true"] .bkbg-fc-inner { |
| 51 |
transform: rotateY(180deg); |
| 52 |
} |
| 53 |
|
| 54 |
.bkbg-fc-outer[data-flip-dir="vertical"][data-flip-trigger="click"][data-flipped="true"] .bkbg-fc-inner { |
| 55 |
transform: rotateX(180deg); |
| 56 |
} |
| 57 |
|
| 58 |
/* ── Both faces ─────────────────────────────────────────── */ |
| 59 |
.bkbg-fc-face { |
| 60 |
position: absolute; |
| 61 |
inset: 0; |
| 62 |
display: flex; |
| 63 |
flex-direction: column; |
| 64 |
justify-content: center; |
| 65 |
box-sizing: border-box; |
| 66 |
backface-visibility: hidden; |
| 67 |
-webkit-backface-visibility: hidden; |
| 68 |
overflow: hidden; |
| 69 |
border-radius: var(--bkbg-fc-radius, 16px); |
| 70 |
} |
| 71 |
|
| 72 |
/* ── Front face ─────────────────────────────────────────── */ |
| 73 |
.bkbg-fc-front { |
| 74 |
background: #ffffff; |
| 75 |
/* rotation = 0° already faces viewer */ |
| 76 |
} |
| 77 |
|
| 78 |
/* ── Back face ──────────────────────────────────────────── */ |
| 79 |
.bkbg-fc-back { |
| 80 |
background: #3b82f6; |
| 81 |
transform: rotateY(180deg); |
| 82 |
} |
| 83 |
|
| 84 |
.bkbg-fc-outer[data-flip-dir="vertical"] .bkbg-fc-back { |
| 85 |
transform: rotateX(180deg); |
| 86 |
} |
| 87 |
|
| 88 |
/* ── Icon wrapper ───────────────────────────────────────── */ |
| 89 |
.bkbg-fc-icon-wrap { |
| 90 |
flex-shrink: 0; |
| 91 |
} |
| 92 |
|
| 93 |
.bkbg-fc-icon { |
| 94 |
display: inline-flex; |
| 95 |
align-items: center; |
| 96 |
justify-content: center; |
| 97 |
width: var(--bkbg-fc-icon-size, 48px); |
| 98 |
height: var(--bkbg-fc-icon-size, 48px); |
| 99 |
color: var(--bkbg-fc-icon-color, currentColor); |
| 100 |
flex-shrink: 0; |
| 101 |
} |
| 102 |
|
| 103 |
.bkbg-fc-icon svg { |
| 104 |
display: block; |
| 105 |
width: var(--bkbg-fc-icon-size, 48px); |
| 106 |
height: var(--bkbg-fc-icon-size, 48px); |
| 107 |
fill: currentColor; |
| 108 |
} |
| 109 |
|
| 110 |
.bkbg-fc-icon .dashicons { |
| 111 |
font-size: var(--bkbg-fc-icon-size, 48px); |
| 112 |
width: var(--bkbg-fc-icon-size, 48px); |
| 113 |
height: var(--bkbg-fc-icon-size, 48px); |
| 114 |
color: inherit; |
| 115 |
} |
| 116 |
|
| 117 |
.bkbg-fc-char { |
| 118 |
font-size: var(--bkbg-fc-icon-size, 48px); |
| 119 |
line-height: 1; |
| 120 |
display: block; |
| 121 |
color: inherit; |
| 122 |
} |
| 123 |
|
| 124 |
/* ── Front title ────────────────────────────────────────── */ |
| 125 |
.bkbg-fc-outer .bkbg-fc-front-title { |
| 126 |
font-family: var(--bkbg-flipc-ft-font-family, inherit); |
| 127 |
font-size: var(--bkbg-flipc-ft-font-size-d, 20px); |
| 128 |
font-weight: var(--bkbg-flipc-ft-font-weight, 700); |
| 129 |
line-height: var(--bkbg-flipc-ft-line-height-d, 1.3); |
| 130 |
text-transform: var(--bkbg-flipc-ft-text-transform, none); |
| 131 |
font-style: var(--bkbg-flipc-ft-font-style, normal); |
| 132 |
text-decoration: var(--bkbg-flipc-ft-text-decoration, none); |
| 133 |
letter-spacing: var(--bkbg-flipc-ft-letter-spacing-d, normal); |
| 134 |
word-spacing: var(--bkbg-flipc-ft-word-spacing-d, normal); |
| 135 |
margin: 0; |
| 136 |
padding: 0; |
| 137 |
} |
| 138 |
|
| 139 |
/* ── Subtitle / tag line ────────────────────────────────── */ |
| 140 |
.bkbg-fc-outer .bkbg-fc-sub { |
| 141 |
font-family: var(--bkbg-flipc-fs-font-family, inherit); |
| 142 |
font-size: var(--bkbg-flipc-fs-font-size-d, 13px); |
| 143 |
font-weight: var(--bkbg-flipc-fs-font-weight, 400); |
| 144 |
line-height: var(--bkbg-flipc-fs-line-height-d, 1.4); |
| 145 |
text-transform: var(--bkbg-flipc-fs-text-transform, none); |
| 146 |
font-style: var(--bkbg-flipc-fs-font-style, normal); |
| 147 |
text-decoration: var(--bkbg-flipc-fs-text-decoration, none); |
| 148 |
letter-spacing: var(--bkbg-flipc-fs-letter-spacing-d, normal); |
| 149 |
word-spacing: var(--bkbg-flipc-fs-word-spacing-d, normal); |
| 150 |
margin: 0; |
| 151 |
padding: 0; |
| 152 |
} |
| 153 |
|
| 154 |
/* ── Flip hint ──────────────────────────────────────────── */ |
| 155 |
.bkbg-fc-hint { |
| 156 |
margin: 0; |
| 157 |
padding: 0; |
| 158 |
} |
| 159 |
|
| 160 |
/* ── Back title ─────────────────────────────────────────── */ |
| 161 |
.bkbg-fc-outer .bkbg-fc-back-title { |
| 162 |
font-family: var(--bkbg-flipc-bt-font-family, inherit); |
| 163 |
font-size: var(--bkbg-flipc-bt-font-size-d, 20px); |
| 164 |
font-weight: var(--bkbg-flipc-bt-font-weight, 700); |
| 165 |
line-height: var(--bkbg-flipc-bt-line-height-d, 1.3); |
| 166 |
text-transform: var(--bkbg-flipc-bt-text-transform, none); |
| 167 |
font-style: var(--bkbg-flipc-bt-font-style, normal); |
| 168 |
text-decoration: var(--bkbg-flipc-bt-text-decoration, none); |
| 169 |
letter-spacing: var(--bkbg-flipc-bt-letter-spacing-d, normal); |
| 170 |
word-spacing: var(--bkbg-flipc-bt-word-spacing-d, normal); |
| 171 |
margin: 0; |
| 172 |
padding: 0; |
| 173 |
} |
| 174 |
|
| 175 |
/* ── Back body text ─────────────────────────────────────── */ |
| 176 |
.bkbg-fc-outer .bkbg-fc-back-text { |
| 177 |
font-family: var(--bkbg-flipc-bx-font-family, inherit); |
| 178 |
font-size: var(--bkbg-flipc-bx-font-size-d, 14px); |
| 179 |
font-weight: var(--bkbg-flipc-bx-font-weight, 400); |
| 180 |
line-height: var(--bkbg-flipc-bx-line-height-d, 1.65); |
| 181 |
text-transform: var(--bkbg-flipc-bx-text-transform, none); |
| 182 |
font-style: var(--bkbg-flipc-bx-font-style, normal); |
| 183 |
text-decoration: var(--bkbg-flipc-bx-text-decoration, none); |
| 184 |
letter-spacing: var(--bkbg-flipc-bx-letter-spacing-d, normal); |
| 185 |
word-spacing: var(--bkbg-flipc-bx-word-spacing-d, normal); |
| 186 |
margin: 0; |
| 187 |
padding: 0; |
| 188 |
} |
| 189 |
|
| 190 |
/* ── Button ─────────────────────────────────────────────── */ |
| 191 |
.bkbg-fc-btn { |
| 192 |
display: inline-block; |
| 193 |
font-family: var(--bkbg-flipc-bn-font-family, inherit); |
| 194 |
font-size: var(--bkbg-flipc-bn-font-size-d, 14px); |
| 195 |
font-weight: var(--bkbg-flipc-bn-font-weight, 600); |
| 196 |
line-height: var(--bkbg-flipc-bn-line-height-d, 1.2); |
| 197 |
text-transform: var(--bkbg-flipc-bn-text-transform, none); |
| 198 |
font-style: var(--bkbg-flipc-bn-font-style, normal); |
| 199 |
text-decoration: var(--bkbg-flipc-bn-text-decoration, none); |
| 200 |
letter-spacing: var(--bkbg-flipc-bn-letter-spacing-d, normal); |
| 201 |
word-spacing: var(--bkbg-flipc-bn-word-spacing-d, normal); |
| 202 |
white-space: nowrap; |
| 203 |
transition: opacity .15s ease, transform .15s ease; |
| 204 |
cursor: pointer; |
| 205 |
} |
| 206 |
|
| 207 |
.bkbg-fc-btn:hover { |
| 208 |
opacity: .85; |
| 209 |
transform: translateY(-1px); |
| 210 |
} |
| 211 |
|
| 212 |
/* ── Typography responsive ──────────────────────────────── */ |
| 213 |
@media (max-width: 1024px) { |
| 214 |
.bkbg-fc-outer .bkbg-fc-front-title { |
| 215 |
font-size: var(--bkbg-flipc-ft-font-size-t, var(--bkbg-flipc-ft-font-size-d, 20px)); |
| 216 |
line-height: var(--bkbg-flipc-ft-line-height-t, var(--bkbg-flipc-ft-line-height-d, 1.3)); |
| 217 |
letter-spacing: var(--bkbg-flipc-ft-letter-spacing-t, var(--bkbg-flipc-ft-letter-spacing-d, normal)); |
| 218 |
word-spacing: var(--bkbg-flipc-ft-word-spacing-t, var(--bkbg-flipc-ft-word-spacing-d, normal)); |
| 219 |
} |
| 220 |
.bkbg-fc-outer .bkbg-fc-sub { |
| 221 |
font-size: var(--bkbg-flipc-fs-font-size-t, var(--bkbg-flipc-fs-font-size-d, 13px)); |
| 222 |
line-height: var(--bkbg-flipc-fs-line-height-t, var(--bkbg-flipc-fs-line-height-d, 1.4)); |
| 223 |
letter-spacing: var(--bkbg-flipc-fs-letter-spacing-t, var(--bkbg-flipc-fs-letter-spacing-d, normal)); |
| 224 |
word-spacing: var(--bkbg-flipc-fs-word-spacing-t, var(--bkbg-flipc-fs-word-spacing-d, normal)); |
| 225 |
} |
| 226 |
.bkbg-fc-outer .bkbg-fc-back-title { |
| 227 |
font-size: var(--bkbg-flipc-bt-font-size-t, var(--bkbg-flipc-bt-font-size-d, 20px)); |
| 228 |
line-height: var(--bkbg-flipc-bt-line-height-t, var(--bkbg-flipc-bt-line-height-d, 1.3)); |
| 229 |
letter-spacing: var(--bkbg-flipc-bt-letter-spacing-t, var(--bkbg-flipc-bt-letter-spacing-d, normal)); |
| 230 |
word-spacing: var(--bkbg-flipc-bt-word-spacing-t, var(--bkbg-flipc-bt-word-spacing-d, normal)); |
| 231 |
} |
| 232 |
.bkbg-fc-outer .bkbg-fc-back-text { |
| 233 |
font-size: var(--bkbg-flipc-bx-font-size-t, var(--bkbg-flipc-bx-font-size-d, 14px)); |
| 234 |
line-height: var(--bkbg-flipc-bx-line-height-t, var(--bkbg-flipc-bx-line-height-d, 1.65)); |
| 235 |
letter-spacing: var(--bkbg-flipc-bx-letter-spacing-t, var(--bkbg-flipc-bx-letter-spacing-d, normal)); |
| 236 |
word-spacing: var(--bkbg-flipc-bx-word-spacing-t, var(--bkbg-flipc-bx-word-spacing-d, normal)); |
| 237 |
} |
| 238 |
.bkbg-fc-btn { |
| 239 |
font-size: var(--bkbg-flipc-bn-font-size-t, var(--bkbg-flipc-bn-font-size-d, 14px)); |
| 240 |
line-height: var(--bkbg-flipc-bn-line-height-t, var(--bkbg-flipc-bn-line-height-d, 1.2)); |
| 241 |
letter-spacing: var(--bkbg-flipc-bn-letter-spacing-t, var(--bkbg-flipc-bn-letter-spacing-d, normal)); |
| 242 |
word-spacing: var(--bkbg-flipc-bn-word-spacing-t, var(--bkbg-flipc-bn-word-spacing-d, normal)); |
| 243 |
} |
| 244 |
} |
| 245 |
|
| 246 |
@media (max-width: 767px) { |
| 247 |
.bkbg-fc-outer .bkbg-fc-front-title { |
| 248 |
font-size: var(--bkbg-flipc-ft-font-size-m, var(--bkbg-flipc-ft-font-size-t, var(--bkbg-flipc-ft-font-size-d, 20px))); |
| 249 |
line-height: var(--bkbg-flipc-ft-line-height-m, var(--bkbg-flipc-ft-line-height-t, var(--bkbg-flipc-ft-line-height-d, 1.3))); |
| 250 |
letter-spacing: var(--bkbg-flipc-ft-letter-spacing-m, var(--bkbg-flipc-ft-letter-spacing-t, var(--bkbg-flipc-ft-letter-spacing-d, normal))); |
| 251 |
word-spacing: var(--bkbg-flipc-ft-word-spacing-m, var(--bkbg-flipc-ft-word-spacing-t, var(--bkbg-flipc-ft-word-spacing-d, normal))); |
| 252 |
} |
| 253 |
.bkbg-fc-outer .bkbg-fc-sub { |
| 254 |
font-size: var(--bkbg-flipc-fs-font-size-m, var(--bkbg-flipc-fs-font-size-t, var(--bkbg-flipc-fs-font-size-d, 13px))); |
| 255 |
line-height: var(--bkbg-flipc-fs-line-height-m, var(--bkbg-flipc-fs-line-height-t, var(--bkbg-flipc-fs-line-height-d, 1.4))); |
| 256 |
letter-spacing: var(--bkbg-flipc-fs-letter-spacing-m, var(--bkbg-flipc-fs-letter-spacing-t, var(--bkbg-flipc-fs-letter-spacing-d, normal))); |
| 257 |
word-spacing: var(--bkbg-flipc-fs-word-spacing-m, var(--bkbg-flipc-fs-word-spacing-t, var(--bkbg-flipc-fs-word-spacing-d, normal))); |
| 258 |
} |
| 259 |
.bkbg-fc-outer .bkbg-fc-back-title { |
| 260 |
font-size: var(--bkbg-flipc-bt-font-size-m, var(--bkbg-flipc-bt-font-size-t, var(--bkbg-flipc-bt-font-size-d, 20px))); |
| 261 |
line-height: var(--bkbg-flipc-bt-line-height-m, var(--bkbg-flipc-bt-line-height-t, var(--bkbg-flipc-bt-line-height-d, 1.3))); |
| 262 |
letter-spacing: var(--bkbg-flipc-bt-letter-spacing-m, var(--bkbg-flipc-bt-letter-spacing-t, var(--bkbg-flipc-bt-letter-spacing-d, normal))); |
| 263 |
word-spacing: var(--bkbg-flipc-bt-word-spacing-m, var(--bkbg-flipc-bt-word-spacing-t, var(--bkbg-flipc-bt-word-spacing-d, normal))); |
| 264 |
} |
| 265 |
.bkbg-fc-outer .bkbg-fc-back-text { |
| 266 |
font-size: var(--bkbg-flipc-bx-font-size-m, var(--bkbg-flipc-bx-font-size-t, var(--bkbg-flipc-bx-font-size-d, 14px))); |
| 267 |
line-height: var(--bkbg-flipc-bx-line-height-m, var(--bkbg-flipc-bx-line-height-t, var(--bkbg-flipc-bx-line-height-d, 1.65))); |
| 268 |
letter-spacing: var(--bkbg-flipc-bx-letter-spacing-m, var(--bkbg-flipc-bx-letter-spacing-t, var(--bkbg-flipc-bx-letter-spacing-d, normal))); |
| 269 |
word-spacing: var(--bkbg-flipc-bx-word-spacing-m, var(--bkbg-flipc-bx-word-spacing-t, var(--bkbg-flipc-bx-word-spacing-d, normal))); |
| 270 |
} |
| 271 |
.bkbg-fc-btn { |
| 272 |
font-size: var(--bkbg-flipc-bn-font-size-m, var(--bkbg-flipc-bn-font-size-t, var(--bkbg-flipc-bn-font-size-d, 14px))); |
| 273 |
line-height: var(--bkbg-flipc-bn-line-height-m, var(--bkbg-flipc-bn-line-height-t, var(--bkbg-flipc-bn-line-height-d, 1.2))); |
| 274 |
letter-spacing: var(--bkbg-flipc-bn-letter-spacing-m, var(--bkbg-flipc-bn-letter-spacing-t, var(--bkbg-flipc-bn-letter-spacing-d, normal))); |
| 275 |
word-spacing: var(--bkbg-flipc-bn-word-spacing-m, var(--bkbg-flipc-bn-word-spacing-t, var(--bkbg-flipc-bn-word-spacing-d, normal))); |
| 276 |
} |
| 277 |
} |
| 278 |
|
| 279 |
/* ── Reduced motion ─────────────────────────────────────── */ |
| 280 |
@media (prefers-reduced-motion: reduce) { |
| 281 |
.bkbg-fc-inner { |
| 282 |
transition: none; |
| 283 |
} |
| 284 |
} |
| 285 |
|