| 1 |
/** |
| 2 |
* Schema Markup Admin Styles |
| 3 |
* |
| 4 |
* @package MetaSync |
| 5 |
* @subpackage Schema_Markup |
| 6 |
*/ |
| 7 |
|
| 8 |
/* Multiple Schema Types Support */ |
| 9 |
.schema-types-container { |
| 10 |
margin-top: 15px; |
| 11 |
} |
| 12 |
|
| 13 |
.schema-types-header h4 { |
| 14 |
margin: 0 0 10px 0; |
| 15 |
color: #333; |
| 16 |
} |
| 17 |
|
| 18 |
.schema-type-item { |
| 19 |
margin: 15px 0; |
| 20 |
padding: 15px; |
| 21 |
border: 1px solid #ddd; |
| 22 |
border-radius: 4px; |
| 23 |
background: #f9f9f9; |
| 24 |
position: relative; |
| 25 |
} |
| 26 |
|
| 27 |
.schema-type-header { |
| 28 |
display: flex; |
| 29 |
justify-content: space-between; |
| 30 |
align-items: center; |
| 31 |
margin-bottom: 15px; |
| 32 |
padding-bottom: 10px; |
| 33 |
border-bottom: 1px solid #e0e0e0; |
| 34 |
} |
| 35 |
|
| 36 |
.schema-type-header h5 { |
| 37 |
margin: 0; |
| 38 |
color: #333; |
| 39 |
font-size: 16px; |
| 40 |
} |
| 41 |
|
| 42 |
.schema-type-header .dashicons { |
| 43 |
color: #0073aa; |
| 44 |
margin-right: 5px; |
| 45 |
} |
| 46 |
|
| 47 |
.remove-schema-type { |
| 48 |
display: inline-flex; |
| 49 |
align-items: center; |
| 50 |
gap: 4px; |
| 51 |
color: #dc3232; |
| 52 |
text-decoration: none; |
| 53 |
font-size: 12px; |
| 54 |
padding: 6px 12px !important; |
| 55 |
/* Match the border to the red label/icon (monochromatic) instead of WP core's |
| 56 |
blue admin-theme border, which clashes with the red content. */ |
| 57 |
border-color: #dc3232 !important; |
| 58 |
} |
| 59 |
|
| 60 |
.remove-schema-type .dashicons { |
| 61 |
display: inline-flex; |
| 62 |
align-items: center; |
| 63 |
justify-content: center; |
| 64 |
color: #dc3232 !important; |
| 65 |
flex-shrink: 0; |
| 66 |
width: 16px; |
| 67 |
height: 16px; |
| 68 |
font-size: 16px; |
| 69 |
/* Override WP core's higher-specificity `.wp-core-ui .button .dashicons` |
| 70 |
(line-height: 1.9; vertical-align: top), which otherwise offsets the glyph. */ |
| 71 |
line-height: 1 !important; |
| 72 |
vertical-align: middle !important; |
| 73 |
margin-bottom: 0.15rem; |
| 74 |
} |
| 75 |
|
| 76 |
.remove-schema-type:hover, |
| 77 |
.remove-schema-type:hover .dashicons { |
| 78 |
color: #a00; |
| 79 |
} |
| 80 |
|
| 81 |
.remove-schema-type:hover { |
| 82 |
border-color: #a00 !important; |
| 83 |
background: rgba(220, 50, 50, 0.06) !important; |
| 84 |
} |
| 85 |
|
| 86 |
/* Keep the focus/active (clicked) state red — WP core otherwise paints a blue |
| 87 |
border and blue box-shadow focus ring from the admin-theme color. */ |
| 88 |
.remove-schema-type:focus, |
| 89 |
.remove-schema-type:active { |
| 90 |
color: #a00 !important; |
| 91 |
border-color: #a00 !important; |
| 92 |
box-shadow: 0 0 0 1px #a00 !important; |
| 93 |
outline: 2px solid transparent; |
| 94 |
} |
| 95 |
|
| 96 |
.no-schema-types { |
| 97 |
text-align: center; |
| 98 |
padding: 20px; |
| 99 |
background: #f9f9f9; |
| 100 |
border: 2px dashed #ddd; |
| 101 |
border-radius: 4px; |
| 102 |
color: #666; |
| 103 |
} |
| 104 |
|
| 105 |
.no-schema-types p { |
| 106 |
margin: 0; |
| 107 |
font-style: italic; |
| 108 |
} |
| 109 |
|
| 110 |
.add-schema-type-section { |
| 111 |
margin-top: 20px; |
| 112 |
text-align: center; |
| 113 |
} |
| 114 |
|
| 115 |
.add-schema-type-section .button { |
| 116 |
font-size: 14px; |
| 117 |
padding: 8px 16px; |
| 118 |
display: inline-flex; |
| 119 |
align-items: center; |
| 120 |
gap: 6px; |
| 121 |
} |
| 122 |
|
| 123 |
.add-schema-type-section .button .dashicons { |
| 124 |
flex-shrink: 0; |
| 125 |
width: 16px; |
| 126 |
height: 16px; |
| 127 |
font-size: 16px; |
| 128 |
line-height: 1; |
| 129 |
} |
| 130 |
|
| 131 |
#add_schema_type_button.button.button-primary .dashicons { |
| 132 |
color: #fff !important; |
| 133 |
} |
| 134 |
|
| 135 |
/* Schema Type Modal */ |
| 136 |
#schema-type-modal { |
| 137 |
position: fixed; |
| 138 |
top: 0; |
| 139 |
left: 0; |
| 140 |
width: 100%; |
| 141 |
height: 100%; |
| 142 |
background: rgba(0,0,0,0.5); |
| 143 |
z-index: 9999; |
| 144 |
display: flex; |
| 145 |
align-items: center; |
| 146 |
justify-content: center; |
| 147 |
} |
| 148 |
|
| 149 |
#schema-type-modal > div { |
| 150 |
background: white; |
| 151 |
padding: 20px; |
| 152 |
border-radius: 4px; |
| 153 |
min-width: 300px; |
| 154 |
box-shadow: 0 4px 8px rgba(0,0,0,0.2); |
| 155 |
} |
| 156 |
|
| 157 |
#schema-type-modal h3 { |
| 158 |
margin-top: 0; |
| 159 |
color: #333; |
| 160 |
} |
| 161 |
|
| 162 |
#schema-type-modal select { |
| 163 |
width: 100%; |
| 164 |
margin-bottom: 15px; |
| 165 |
padding: 8px; |
| 166 |
border: 1px solid #ddd; |
| 167 |
border-radius: 3px; |
| 168 |
} |
| 169 |
|
| 170 |
#schema-type-modal .button { |
| 171 |
margin-left: 5px; |
| 172 |
} |
| 173 |
|
| 174 |
/* Enhanced Schema Field Groups */ |
| 175 |
.schema-field-group { |
| 176 |
margin: 15px 0; |
| 177 |
padding: 15px; |
| 178 |
border: 1px solid #ddd; |
| 179 |
border-radius: 4px; |
| 180 |
background: #fff; |
| 181 |
} |
| 182 |
|
| 183 |
.schema-field-group h4 { |
| 184 |
margin: 0 0 15px 0; |
| 185 |
color: #333; |
| 186 |
font-size: 14px; |
| 187 |
font-weight: 600; |
| 188 |
text-transform: uppercase; |
| 189 |
letter-spacing: 0.5px; |
| 190 |
} |
| 191 |
|
| 192 |
/* Schema Fields Container */ |
| 193 |
.schema-fields-container { |
| 194 |
margin-top: 10px; |
| 195 |
} |
| 196 |
|
| 197 |
/* Improved Field Styling */ |
| 198 |
.schema-field { |
| 199 |
margin: 12px 0; |
| 200 |
} |
| 201 |
|
| 202 |
.schema-field label { |
| 203 |
display: block; |
| 204 |
font-weight: 600; |
| 205 |
margin-bottom: 5px; |
| 206 |
color: #333; |
| 207 |
} |
| 208 |
|
| 209 |
.schema-field input, |
| 210 |
.schema-field select, |
| 211 |
.schema-field textarea { |
| 212 |
width: 100%; |
| 213 |
max-width: 500px; |
| 214 |
padding: 8px 12px; |
| 215 |
border: 1px solid #ddd; |
| 216 |
border-radius: 3px; |
| 217 |
font-size: 14px; |
| 218 |
} |
| 219 |
|
| 220 |
.schema-field input:focus, |
| 221 |
.schema-field select:focus, |
| 222 |
.schema-field textarea:focus { |
| 223 |
border-color: #0073aa; |
| 224 |
box-shadow: 0 0 0 1px #0073aa; |
| 225 |
outline: none; |
| 226 |
} |
| 227 |
|
| 228 |
.schema-field textarea { |
| 229 |
height: 80px; |
| 230 |
resize: vertical; |
| 231 |
} |
| 232 |
|
| 233 |
/* Logo Upload Container */ |
| 234 |
.logo-upload-container { |
| 235 |
display: flex; |
| 236 |
align-items: center; |
| 237 |
gap: 10px; |
| 238 |
margin-bottom: 10px; |
| 239 |
} |
| 240 |
|
| 241 |
.logo-upload-container input { |
| 242 |
flex: 1; |
| 243 |
margin-right: 10px; |
| 244 |
} |
| 245 |
|
| 246 |
.logo-preview { |
| 247 |
margin-top: 10px; |
| 248 |
} |
| 249 |
|
| 250 |
.logo-preview img { |
| 251 |
max-width: 200px; |
| 252 |
max-height: 100px; |
| 253 |
border: 1px solid #ddd; |
| 254 |
padding: 5px; |
| 255 |
border-radius: 3px; |
| 256 |
} |
| 257 |
|
| 258 |
/* FAQ Items Styling */ |
| 259 |
.faq-items-list { |
| 260 |
margin: 15px 0; |
| 261 |
} |
| 262 |
|
| 263 |
.faq-item { |
| 264 |
margin: 15px 0; |
| 265 |
padding: 15px; |
| 266 |
border: 1px solid #ddd; |
| 267 |
border-radius: 4px; |
| 268 |
background: #f9f9f9; |
| 269 |
position: relative; |
| 270 |
} |
| 271 |
|
| 272 |
.faq-item .schema-field { |
| 273 |
margin-bottom: 15px; |
| 274 |
} |
| 275 |
|
| 276 |
.faq-item .schema-field:last-child { |
| 277 |
margin-bottom: 10px; |
| 278 |
} |
| 279 |
|
| 280 |
.remove-faq-item { |
| 281 |
background: #dc3232; |
| 282 |
color: white; |
| 283 |
border: none; |
| 284 |
padding: 6px 12px; |
| 285 |
border-radius: 3px; |
| 286 |
cursor: pointer; |
| 287 |
font-size: 12px; |
| 288 |
} |
| 289 |
|
| 290 |
.remove-faq-item:hover { |
| 291 |
background: #a00; |
| 292 |
} |
| 293 |
|
| 294 |
/* Ingredients and Instructions */ |
| 295 |
.ingredients-list, |
| 296 |
.instructions-list { |
| 297 |
margin: 10px 0; |
| 298 |
} |
| 299 |
|
| 300 |
.ingredient-item, |
| 301 |
.instruction-item { |
| 302 |
margin: 8px 0; |
| 303 |
display: flex; |
| 304 |
align-items: flex-start; |
| 305 |
gap: 10px; |
| 306 |
} |
| 307 |
|
| 308 |
.ingredient-item input, |
| 309 |
.instruction-item textarea { |
| 310 |
flex: 1; |
| 311 |
margin-right: 10px; |
| 312 |
} |
| 313 |
|
| 314 |
.instruction-item textarea { |
| 315 |
min-height: 60px; |
| 316 |
} |
| 317 |
|
| 318 |
.remove-item { |
| 319 |
background: #dc3232; |
| 320 |
color: white; |
| 321 |
border: none; |
| 322 |
padding: 6px 10px; |
| 323 |
cursor: pointer; |
| 324 |
border-radius: 3px; |
| 325 |
font-size: 12px; |
| 326 |
flex-shrink: 0; |
| 327 |
} |
| 328 |
|
| 329 |
.remove-item:hover { |
| 330 |
background: #a00; |
| 331 |
} |
| 332 |
|
| 333 |
.add-ingredient, |
| 334 |
.add-instruction, |
| 335 |
.add-faq-item { |
| 336 |
background: #0073aa; |
| 337 |
color: white; |
| 338 |
border: none; |
| 339 |
padding: 8px 16px; |
| 340 |
cursor: pointer; |
| 341 |
border-radius: 3px; |
| 342 |
margin-top: 10px; |
| 343 |
font-size: 13px; |
| 344 |
} |
| 345 |
|
| 346 |
.add-ingredient:hover, |
| 347 |
.add-instruction:hover, |
| 348 |
.add-faq-item:hover { |
| 349 |
background: #005a87; |
| 350 |
} |
| 351 |
|
| 352 |
/* Preview Section */ |
| 353 |
.schema-preview-section { |
| 354 |
margin-top: 20px; |
| 355 |
padding-top: 20px; |
| 356 |
border-top: 1px solid #e0e0e0; |
| 357 |
} |
| 358 |
|
| 359 |
.schema-preview-section .button { |
| 360 |
margin-right: 10px; |
| 361 |
display: inline-flex; |
| 362 |
align-items: center; |
| 363 |
gap: 6px; |
| 364 |
} |
| 365 |
|
| 366 |
.schema-preview-section .button .dashicons { |
| 367 |
flex-shrink: 0; |
| 368 |
width: 16px; |
| 369 |
height: 16px; |
| 370 |
font-size: 16px; |
| 371 |
line-height: 1; |
| 372 |
} |
| 373 |
|
| 374 |
#schema-preview-output { |
| 375 |
margin-top: 15px; |
| 376 |
padding: 15px; |
| 377 |
background: #f9f9f9; |
| 378 |
border: 1px solid #ddd; |
| 379 |
border-radius: 4px; |
| 380 |
} |
| 381 |
|
| 382 |
#schema-preview-output h4 { |
| 383 |
margin: 0 0 10px 0; |
| 384 |
color: #333; |
| 385 |
} |
| 386 |
|
| 387 |
#schema-json-preview { |
| 388 |
background: #1e1e1e; |
| 389 |
color: #ffffff; |
| 390 |
padding: 15px; |
| 391 |
border: 1px solid #333; |
| 392 |
border-radius: 4px; |
| 393 |
overflow-x: auto; |
| 394 |
max-height: 500px; |
| 395 |
font-family: 'Courier New', Consolas, monospace; |
| 396 |
font-size: 13px; |
| 397 |
line-height: 1.5; |
| 398 |
white-space: pre-wrap; |
| 399 |
} |
| 400 |
|
| 401 |
/* Responsive Design */ |
| 402 |
@media (max-width: 768px) { |
| 403 |
.schema-type-header { |
| 404 |
flex-direction: column; |
| 405 |
align-items: flex-start; |
| 406 |
gap: 10px; |
| 407 |
} |
| 408 |
|
| 409 |
.logo-upload-container { |
| 410 |
flex-direction: column; |
| 411 |
align-items: stretch; |
| 412 |
} |
| 413 |
|
| 414 |
.logo-upload-container input { |
| 415 |
margin-right: 0; |
| 416 |
margin-bottom: 10px; |
| 417 |
} |
| 418 |
|
| 419 |
.ingredient-item, |
| 420 |
.instruction-item { |
| 421 |
flex-direction: column; |
| 422 |
align-items: stretch; |
| 423 |
} |
| 424 |
|
| 425 |
.ingredient-item input, |
| 426 |
.instruction-item textarea { |
| 427 |
margin-right: 0; |
| 428 |
margin-bottom: 10px; |
| 429 |
} |
| 430 |
} |
| 431 |
|
| 432 |
/* Validation Warnings and Notices */ |
| 433 |
.metasync-schema-validation-warning { |
| 434 |
background: #fff3cd; |
| 435 |
border-left: 4px solid #ffc107; |
| 436 |
padding: 12px; |
| 437 |
margin: 15px 0; |
| 438 |
border-radius: 4px; |
| 439 |
} |
| 440 |
|
| 441 |
.metasync-schema-validation-warning p:first-child { |
| 442 |
margin: 0 0 8px 0; |
| 443 |
font-weight: 600; |
| 444 |
color: #856404; |
| 445 |
} |
| 446 |
|
| 447 |
.metasync-schema-validation-warning .dashicons { |
| 448 |
color: #ffc107; |
| 449 |
vertical-align: middle; |
| 450 |
margin-right: 5px; |
| 451 |
} |
| 452 |
|
| 453 |
.metasync-schema-validation-warning ul { |
| 454 |
margin: 0; |
| 455 |
padding-left: 20px; |
| 456 |
color: #856404; |
| 457 |
} |
| 458 |
|
| 459 |
.metasync-schema-validation-warning li { |
| 460 |
margin: 5px 0; |
| 461 |
} |
| 462 |
|
| 463 |
/* Schema Requirements Info Box */ |
| 464 |
.metasync-schema-requirements-info { |
| 465 |
background: #e7f3ff; |
| 466 |
border-left: 4px solid #2196F3; |
| 467 |
padding: 12px; |
| 468 |
margin-bottom: 20px; |
| 469 |
border-radius: 4px; |
| 470 |
} |
| 471 |
|
| 472 |
.metasync-schema-requirements-info p { |
| 473 |
margin: 0 0 8px 0; |
| 474 |
color: #1565C0; |
| 475 |
} |
| 476 |
|
| 477 |
.metasync-schema-requirements-info p:first-child { |
| 478 |
font-weight: 600; |
| 479 |
color: #1976D2; |
| 480 |
} |
| 481 |
|
| 482 |
.metasync-schema-requirements-info .dashicons { |
| 483 |
color: #2196F3; |
| 484 |
vertical-align: middle; |
| 485 |
margin-right: 5px; |
| 486 |
} |
| 487 |
|
| 488 |
.metasync-schema-requirements-info ul { |
| 489 |
margin: 8px 0 0 20px; |
| 490 |
color: #1565C0; |
| 491 |
font-size: 13px; |
| 492 |
} |
| 493 |
|
| 494 |
/* Admin Notice Enhancement */ |
| 495 |
.metasync-schema-validation-notice h3 { |
| 496 |
margin: 0.5em 0; |
| 497 |
color: #d63638; |
| 498 |
} |
| 499 |
|
| 500 |
.metasync-schema-validation-notice ul { |
| 501 |
list-style: disc; |
| 502 |
margin-left: 20px; |
| 503 |
} |
| 504 |
|
| 505 |
.metasync-schema-validation-notice p em { |
| 506 |
color: #646970; |
| 507 |
} |
| 508 |
|
| 509 |
/* Schema Type Selection */ |
| 510 |
.schema-type-selection { |
| 511 |
margin-top: 15px; |
| 512 |
} |
| 513 |
|
| 514 |
/* Description text */ |
| 515 |
.schema-field .description { |
| 516 |
color: #646970; |
| 517 |
font-size: 12px; |
| 518 |
margin-top: 4px; |
| 519 |
font-style: italic; |
| 520 |
} |
| 521 |
|
| 522 |
|