/**
 * Style Reset for Scrolls Community Hub theme
 *
 * This file ensures consistent styling between editor and frontend
 * by resetting specific elements to a common baseline.
 */

 /* Style for post count */
.wp-block-categories-list li .count,
.wp-block-categories li .count,
.editor-styles-wrapper .wp-block-categories-list li .count,
.editor-styles-wrapper .wp-block-categories li .count {
    display: inline-block !important;
    /* Použití proměnných z theme.json pro barvy */
    background-color: var(--wp--preset--color--accent, rgba(230, 81, 0, 0.1)) !important;
    color: var(--wp--preset--color--primary, #e65100) !important;
    font-size: 0.75rem !important;
    padding: 0.1rem 0.4rem !important;
    border-radius: 0.25rem !important;
    margin-left: auto !important;
    white-space: nowrap !important;
}

/* Remove parentheses from count */
.wp-block-categories-list .count::before,
.wp-block-categories-list .count::after,
.wp-block-categories .count::before,
.wp-block-categories .count::after,
.editor-styles-wrapper .wp-block-categories-list .count::before,
.editor-styles-wrapper .wp-block-categories-list .count::after,
.editor-styles-wrapper .wp-block-categories .count::before,
.editor-styles-wrapper .wp-block-categories .count::after {
    display: none !important;
}

/* Nested categories styling */
.wp-block-categories-list .children,
.wp-block-categories .children,
.editor-styles-wrapper .wp-block-categories-list .children,
.editor-styles-wrapper .wp-block-categories .children {
    width: 100% !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    position: relative !important;
}

/* Add a vertical line to show hierarchy */
.wp-block-categories-list .children::before,
.wp-block-categories .children::before,
.editor-styles-wrapper .wp-block-categories-list .children::before,
.editor-styles-wrapper .wp-block-categories .children::before {
    content: '' !important;
    position: absolute !important;
    left: 0.5rem !important;
    top: 0 !important;
    bottom: 0.5rem !important;
    width: 2px !important;
    /* Použití proměnných z theme.json pro barvy */
    background-color: var(--wp--preset--color--accent, rgba(230, 81, 0, 0.1)) !important;
    border-radius: 1px !important;
}

/* Reset for post cards */
.wp-block-post .is-style-card,
.editor-styles-wrapper .wp-block-post .is-style-card {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.wp-block-post .is-style-card > *:not(.wp-block-post-featured-image),
.editor-styles-wrapper .wp-block-post .is-style-card > *:not(.wp-block-post-featured-image) {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Featured image styling */
.wp-block-post .is-style-card .wp-block-post-featured-image,
.editor-styles-wrapper .wp-block-post .is-style-card .wp-block-post-featured-image {
    order: -1 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 130px !important;
    overflow: hidden !important;
}

.wp-block-post .is-style-card .wp-block-post-featured-image img,
.editor-styles-wrapper .wp-block-post .is-style-card .wp-block-post-featured-image img {
    width: 100% !important;
    height: 130px !important;
    object-fit: cover !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}
