/* LowDesign — Global layer (all core blocks, gentle defaults) */

/* Tokens (BS as source-of-truth if present) */
:root {
    /* Bootstrap-bridged vars */
    --ld-radius: var(--bs-border-radius, 0.75rem);
    --ld-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --ld-border: var(--bs-border-color, rgba(0, 0, 0, 0.12));
    --ld-gap: var(--wp--style--block-gap, 1rem);
    --ld-fg: var(--bs-body-color, #111);

    /* Rounded-1 defaults */
    --ld-media-radius: 0.25rem; /* ~4px for images/covers/gallery by default */
    --ld-btn-radius: 0.375rem; /* ~6px for buttons by default */
}

/* Base typography inside all blocks */
:where([class^="wp-block-"]) {
    color: var(--ld-fg);
    line-height: 1.5;
}

/* Containers spacing */
:where(
    .wp-block-group,
    .wp-block-cover,
    .wp-block-media-text,
    .wp-block-columns
) {
    gap: var(--ld-gap);
}

/* MEDIA — default = Rounded-1 */
:where(
    .wp-block-image img,
    .wp-block-gallery img,
    .wp-block-cover,
    .wp-block-media-text img
) {
    border-radius: var(--ld-media-radius);
}

/* BUTTONS — default small radius */
:where(.wp-block-button__link) {
    border-radius: var(--ld-btn-radius);
    padding: 0.625rem 1rem;
}
:where(.wp-block-button__link):focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* TABLES */
:where(.wp-block-table table) {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-media-radius);
}
:where(.wp-block-table td, .wp-block-table th) {
    border-bottom: 1px solid var(--ld-border);
    padding: 0.625rem 0.75rem;
}

/* Focus ring for interactive */
:where(a, button, [role="button"], input, textarea, select):focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Respect reduced motion (optional to keep page snappy) */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
