| 1 |
@import url(../../../assets/fonts/nunito/nunito.css); |
| 2 |
|
| 3 |
/* Hide stray <br> that TinyMCE inserts */ |
| 4 |
.mv-shortcode-placeholder br:first-child:last-child { |
| 5 |
display: none; |
| 6 |
} |
| 7 |
|
| 8 |
/* Ensure shortcode blocks are full-width */ |
| 9 |
[data-shortcode] { |
| 10 |
display: block; |
| 11 |
width: 100%; |
| 12 |
} |
| 13 |
|
| 14 |
/* Override TinyMCE's default selected outline */ |
| 15 |
.mce-content-body [data-shortcode][data-mce-selected] { |
| 16 |
outline: none !important; |
| 17 |
} |
| 18 |
|
| 19 |
.mce-content-body [data-shortcode][data-mce-selected] .mv-shortcode-placeholder { |
| 20 |
border-color: #3d5b6d; |
| 21 |
box-shadow: 0 0 0 1px #3d5b6d; |
| 22 |
} |
| 23 |
|
| 24 |
/* ============================================ |
| 25 |
Base card container |
| 26 |
============================================ */ |
| 27 |
.mv-shortcode-placeholder { |
| 28 |
position: relative; |
| 29 |
margin: 20px 40px; |
| 30 |
border: 2px solid #e0e0e0; |
| 31 |
border-radius: 4px; |
| 32 |
background: #f8f9fa; |
| 33 |
overflow: hidden; |
| 34 |
font-family: 'Nunito', Helvetica, Arial, sans-serif; |
| 35 |
transition: border-color 0.15s ease; |
| 36 |
} |
| 37 |
|
| 38 |
.mv-shortcode-placeholder[contentEditable=false] { |
| 39 |
cursor: pointer; |
| 40 |
} |
| 41 |
|
| 42 |
[data-shortcode]:hover .mv-shortcode-placeholder, |
| 43 |
[data-shortcode]:focus .mv-shortcode-placeholder { |
| 44 |
border-color: #3d5b6d; |
| 45 |
} |
| 46 |
|
| 47 |
/* ============================================ |
| 48 |
With thumbnail — full image card (16:9) |
| 49 |
============================================ */ |
| 50 |
.mv-shortcode-placeholder.has-thumbnail { |
| 51 |
max-height: 360px; |
| 52 |
height: 100%; |
| 53 |
aspect-ratio: 4 / 3; |
| 54 |
background: #1a1a1a; |
| 55 |
border-color: transparent; |
| 56 |
} |
| 57 |
|
| 58 |
[data-shortcode]:hover .mv-shortcode-placeholder.has-thumbnail, |
| 59 |
[data-shortcode]:focus .mv-shortcode-placeholder.has-thumbnail { |
| 60 |
border-color: #3d5b6d; |
| 61 |
} |
| 62 |
|
| 63 |
/* Thumbnail background */ |
| 64 |
.mv-thumbnail { |
| 65 |
position: absolute; |
| 66 |
top: 0; |
| 67 |
left: 0; |
| 68 |
width: 100%; |
| 69 |
height: 100%; |
| 70 |
z-index: 1; |
| 71 |
background-position: center; |
| 72 |
background-size: cover; |
| 73 |
} |
| 74 |
|
| 75 |
/* Gradient overlay on thumbnail */ |
| 76 |
.mv-overlay { |
| 77 |
position: absolute; |
| 78 |
top: 0; |
| 79 |
left: 0; |
| 80 |
width: 100%; |
| 81 |
height: 100%; |
| 82 |
z-index: 2; |
| 83 |
background: linear-gradient( |
| 84 |
to top, |
| 85 |
rgba(0, 0, 0, 0.65) 0%, |
| 86 |
rgba(0, 0, 0, 0.15) 50%, |
| 87 |
rgba(0, 0, 0, 0.05) 100% |
| 88 |
); |
| 89 |
} |
| 90 |
|
| 91 |
/* Caption on thumbnail card (bottom-left) */ |
| 92 |
.mv-shortcode-caption { |
| 93 |
position: absolute; |
| 94 |
bottom: 0; |
| 95 |
left: 0; |
| 96 |
right: 0; |
| 97 |
z-index: 3; |
| 98 |
padding: 20px; |
| 99 |
display: flex; |
| 100 |
flex-direction: column; |
| 101 |
gap: 4px; |
| 102 |
} |
| 103 |
|
| 104 |
.mv-shortcode-caption .mv-shortcode-label { |
| 105 |
color: rgba(255, 255, 255, 0.8); |
| 106 |
} |
| 107 |
|
| 108 |
.mv-shortcode-caption .mv-shortcode-heading { |
| 109 |
color: #fff; |
| 110 |
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); |
| 111 |
} |
| 112 |
|
| 113 |
/* ============================================ |
| 114 |
Without thumbnail — compact card |
| 115 |
============================================ */ |
| 116 |
.mv-shortcode-compact { |
| 117 |
display: flex; |
| 118 |
align-items: center; |
| 119 |
gap: 16px; |
| 120 |
padding: 16px; |
| 121 |
} |
| 122 |
|
| 123 |
.mv-shortcode-icon { |
| 124 |
flex-shrink: 0; |
| 125 |
width: 48px; |
| 126 |
height: 48px; |
| 127 |
display: flex; |
| 128 |
align-items: center; |
| 129 |
justify-content: center; |
| 130 |
background: #e8f4f8; |
| 131 |
border-radius: 8px; |
| 132 |
} |
| 133 |
|
| 134 |
.mv-shortcode-icon .dashicons { |
| 135 |
font-size: 24px; |
| 136 |
width: 24px; |
| 137 |
height: 24px; |
| 138 |
color: #3d5b6d; |
| 139 |
} |
| 140 |
|
| 141 |
.mv-shortcode-info { |
| 142 |
flex: 1; |
| 143 |
min-width: 0; |
| 144 |
display: flex; |
| 145 |
flex-direction: column; |
| 146 |
gap: 4px; |
| 147 |
} |
| 148 |
|
| 149 |
/* ============================================ |
| 150 |
Shared typography |
| 151 |
============================================ */ |
| 152 |
.mv-shortcode-label { |
| 153 |
font-size: 11px; |
| 154 |
font-weight: 600; |
| 155 |
text-transform: uppercase; |
| 156 |
letter-spacing: 0.5px; |
| 157 |
line-height: 1.4; |
| 158 |
color: #3d5b6d; |
| 159 |
} |
| 160 |
|
| 161 |
.mv-shortcode-heading { |
| 162 |
margin: 0; |
| 163 |
padding: 0; |
| 164 |
font-size: 18px; |
| 165 |
font-weight: 700; |
| 166 |
line-height: 1.3; |
| 167 |
font-family: 'Nunito', Helvetica, Arial, sans-serif; |
| 168 |
color: #1a1a1a; |
| 169 |
} |
| 170 |
|
| 171 |
.mv-shortcode-description { |
| 172 |
font-size: 13px; |
| 173 |
font-style: italic; |
| 174 |
line-height: 1.4; |
| 175 |
color: #888; |
| 176 |
} |
| 177 |
|
| 178 |
/* ============================================ |
| 179 |
Hover action overlay (Edit / Replace) |
| 180 |
============================================ */ |
| 181 |
.mv-shortcode-hover-actions { |
| 182 |
position: absolute; |
| 183 |
top: 0; |
| 184 |
left: 0; |
| 185 |
right: 0; |
| 186 |
bottom: 0; |
| 187 |
z-index: 10; |
| 188 |
display: none; |
| 189 |
align-items: center; |
| 190 |
justify-content: center; |
| 191 |
gap: 8px; |
| 192 |
border-radius: 4px; |
| 193 |
} |
| 194 |
|
| 195 |
.mv-shortcode-placeholder.has-thumbnail .mv-shortcode-hover-actions { |
| 196 |
background: rgba(0, 0, 0, 0.5); |
| 197 |
} |
| 198 |
|
| 199 |
.mv-shortcode-placeholder:not(.has-thumbnail) .mv-shortcode-hover-actions { |
| 200 |
background: rgba(255, 255, 255, 0.85); |
| 201 |
} |
| 202 |
|
| 203 |
[data-shortcode]:hover .mv-shortcode-hover-actions, |
| 204 |
[data-shortcode]:focus .mv-shortcode-hover-actions, |
| 205 |
[data-shortcode][data-mce-selected] .mv-shortcode-hover-actions { |
| 206 |
display: flex; |
| 207 |
} |
| 208 |
|
| 209 |
/* Action buttons */ |
| 210 |
.mv-action-button { |
| 211 |
padding: 8px 16px; |
| 212 |
border-radius: 4px; |
| 213 |
font-family: 'Nunito', Helvetica, Arial, sans-serif; |
| 214 |
font-size: 14px; |
| 215 |
font-weight: 500; |
| 216 |
cursor: pointer; |
| 217 |
transition: all 0.15s ease; |
| 218 |
line-height: 1.4; |
| 219 |
} |
| 220 |
|
| 221 |
.mv-action-primary { |
| 222 |
background: #3d5b6d; |
| 223 |
color: #fff; |
| 224 |
border: 2px solid #3d5b6d; |
| 225 |
} |
| 226 |
|
| 227 |
.mv-action-primary:hover { |
| 228 |
background: #2d4a59; |
| 229 |
border-color: #2d4a59; |
| 230 |
} |
| 231 |
|
| 232 |
.mv-action-secondary { |
| 233 |
background: #fff; |
| 234 |
color: #3d5b6d; |
| 235 |
border: 2px solid #3d5b6d; |
| 236 |
} |
| 237 |
|
| 238 |
.mv-action-secondary:hover { |
| 239 |
background: #f5f5f5; |
| 240 |
} |
| 241 |
|
| 242 |
/* ============================================ |
| 243 |
Delete button |
| 244 |
============================================ */ |
| 245 |
.mv-delete { |
| 246 |
display: none; |
| 247 |
position: absolute; |
| 248 |
z-index: 100; |
| 249 |
top: 8px; |
| 250 |
right: 8px; |
| 251 |
width: 28px; |
| 252 |
height: 28px; |
| 253 |
color: #fff; |
| 254 |
background-color: rgba(0, 0, 0, 0.5); |
| 255 |
border-radius: 4px; |
| 256 |
cursor: pointer; |
| 257 |
transition: background-color 0.15s ease; |
| 258 |
/* Center the dashicon */ |
| 259 |
align-items: center; |
| 260 |
justify-content: center; |
| 261 |
} |
| 262 |
|
| 263 |
[data-shortcode]:hover .mv-delete, |
| 264 |
[data-shortcode]:focus .mv-delete, |
| 265 |
[data-shortcode]:active .mv-delete, |
| 266 |
[data-shortcode][data-mce-selected] .mv-delete { |
| 267 |
display: flex !important; |
| 268 |
} |
| 269 |
|
| 270 |
.mv-delete:hover, |
| 271 |
.mv-delete:focus, |
| 272 |
.mv-delete:active { |
| 273 |
background-color: #c43225; |
| 274 |
} |
| 275 |
|
| 276 |
.mv-delete .dashicons { |
| 277 |
font-size: 18px; |
| 278 |
width: 18px; |
| 279 |
height: 18px; |
| 280 |
line-height: 1; |
| 281 |
position: relative; |
| 282 |
padding: 0; |
| 283 |
} |
| 284 |
|
| 285 |
/* ============================================ |
| 286 |
Mobile |
| 287 |
============================================ */ |
| 288 |
@supports (-webkit-overflow-scrolling: touch) { |
| 289 |
.mv-action-button { |
| 290 |
cursor: pointer; |
| 291 |
} |
| 292 |
.mv-delete { |
| 293 |
display: none; |
| 294 |
} |
| 295 |
} |
| 296 |
|