/* WPE Taxonomy Terms Block - Frontend Styles - SIMPLIFIED */

/* Base Wrapper Styles */
.wp-block-wpe-taxonomy-terms {
    --wpe-terms-gap: 8px;
    position: relative;
}

/* Core Layout Styles */
.wpe-taxonomy-terms .wpe-terms-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--wpe-terms-gap);
}

.wpe-direction-horizontal .wpe-terms-list {
    flex-direction: row;
    flex-wrap: wrap;
}

.wpe-direction-vertical .wpe-terms-list {
    flex-direction: column;
}

/* Comma Layout Support */
.wpe-layout-comma .wpe-terms-comma {
    line-height: inherit;
    display: inline;
}

.wpe-layout-comma .wpe-terms-comma a:not(:last-child)::after {
    content: ", ";
    color: currentColor;
    text-decoration: none;
    pointer-events: none;
    margin-right: 0.25em;
}

/* Term Item Base Styles */
.wpe-term-item {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* TERM LINK STYLES - SIMPLIFIED TO FONT SIZE ONLY */
.wpe-term-link {
    display: inline-block;
    text-decoration: none;
    position: relative;
    
    /* Default styles */
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    border: 1px solid transparent;
    
    padding: 5px 15px;
    line-height: 1em;
    background-color: #EAEAEA;
    border-radius: 20px;

}

.wpe-term-link:hover,
.wpe-term-link:focus {
    text-decoration: none;
    border:1px solid #ddd;
}

/* FONT SIZE SUPPORT ONLY */
.wpe-term-link.has-small-font-size {
    font-size: 13px !important;/*var(--wp--preset--font-size--small) !important; */
}

.wpe-term-link.has-medium-font-size {
    font-size: var(--wp--preset--font-size--medium) !important;
}

.wpe-term-link.has-large-font-size {
    font-size: var(--wp--preset--font-size--large) !important;
    padding: 0.3em 0.6em;
}

.wpe-term-link.has-huge-font-size {
    font-size: var(--wp--preset--font-size--huge) !important;
    padding: 0.4em 0.8em;
}

.wpe-term-link.has-x-large-font-size {
    font-size: var(--wp--preset--font-size--x-large) !important;
    padding: 0.35em 0.7em;
}

/* Comma Layout Specific Adjustments */
.wpe-layout-comma .wpe-term-link {
    background-color: transparent;
    padding: 0;
    text-decoration: underline;
    border-radius: 0;
    border: none;
}

.wpe-layout-comma .wpe-term-link:hover,
.wpe-layout-comma .wpe-term-link:focus {
    background-color: transparent;
    text-decoration: underline;
    transform: none;
    filter: none;
    box-shadow: none;
}

/* Context-specific Visual Indicators */
.wpe-mode-post-terms::before,
.wpe-mode-selected-terms::before,
.wpe-mode-all-terms::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
}

.wpe-mode-post-terms::before {
    background-color: #0073aa;
}

.wpe-mode-selected-terms::before {
    background-color: #00a32a;
}

.wpe-mode-all-terms::before {
    background-color: #ddd;
}

.wpe-mode-post-terms,
.wpe-mode-selected-terms,
.wpe-mode-all-terms {
    padding-left: 1em;
}

/* No Terms Message */
.wpe-no-terms {
    color: #666;
}
.wpe-no-terms p{ font-size:12px; line-height:1em; padding:0px; margin:0px;font-style:italic;}

/* Query Loop Context Indicator */
.wpe-has-post-context {
    position: relative;
}

.wpe-has-post-context::after {
    
}

/* Block Gap Support */
.wp-block-wpe-taxonomy-terms[style*="--wp--style--block-gap"] .wpe-terms-list {
    gap: var(--wp--style--block-gap, var(--wpe-terms-gap));
}

/* Inline Font Size Support */
.wpe-term-link[style*="font-size:"] {
    /* Font size from inline styles */
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpe-direction-horizontal .wpe-terms-list {
        flex-direction: column;
        gap: calc(var(--wpe-terms-gap) + 4px);
    }
    
    .wpe-term-link {
        padding: 0.4em 0.6em;
    }
    
    .wpe-mode-post-terms,
    .wpe-mode-selected-terms,
    .wpe-mode-all-terms {
        padding-left: 0.5em;
    }
    
    .wpe-mode-post-terms::before,
    .wpe-mode-selected-terms::before,
    .wpe-mode-all-terms::before {
        width: 2px;
    }
}

@media (max-width: 480px) {
    .wpe-term-link:not([style*="font-size:"]) {
        font-size: 0.9em;
    }
    
    .wpe-term-link {
        padding: 0.3em 0.5em;
    }
    
    .wpe-layout-comma .wpe-terms-comma {
        line-height: 1.8;
    }
}

/* Print Styles */
@media print {
    .wp-block-wpe-taxonomy-terms {
        break-inside: avoid;
    }
    
    .wpe-term-link {
        background-color: transparent !important;
        color: #000 !important;
        text-decoration: underline !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .wpe-has-post-context::after,
    .wpe-mode-post-terms::before,
    .wpe-mode-selected-terms::before,
    .wpe-mode-all-terms::before {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wpe-term-link {
        background-color: ButtonFace !important;
        color: ButtonText !important;
        border: 2px solid ButtonText !important;
        border-radius: 0 !important;
    }
    
    .wpe-term-link:hover,
    .wpe-term-link:focus {
        background-color: ButtonText !important;
        color: ButtonFace !important;
        border-color: ButtonFace !important;
    }
    
    .wpe-layout-comma .wpe-term-link {
        background-color: transparent !important;
        border: none !important;
        text-decoration: underline !important;
        color: ButtonText !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .wpe-term-link {
        transition: none;
    }
    
    .wpe-term-link:hover {
        transform: none;
    }
}

/* Focus Indicators for Accessibility */
.wpe-term-link:focus-visible {
    outline: 2px solid #005cee;
    outline-offset: 2px;
}

/* RTL Support */
[dir="rtl"] .wpe-mode-post-terms::before,
[dir="rtl"] .wpe-mode-selected-terms::before,
[dir="rtl"] .wpe-mode-all-terms::before {
    left: auto;
    right: 0;
    border-radius: 2px 0 0 2px;
}

[dir="rtl"] .wpe-mode-post-terms,
[dir="rtl"] .wpe-mode-selected-terms,
[dir="rtl"] .wpe-mode-all-terms {
    padding-left: 0;
    padding-right: 1em;
}

[dir="rtl"] .wpe-has-post-context::after {
    left: auto;
    right: -2px;
}

/* WordPress Theme Integration */
.wp-block-wpe-taxonomy-terms {
    margin-block-start: 1em;
    margin-block-end: 1em;
}




/* Font size specificity helpers */
.wp-block-wpe-taxonomy-terms .wpe-term-link[class*="has-"][class*="font-size"],
.wp-block-wpe-taxonomy-terms .wpe-term-link[style*="font-size"] {
    /* Ensure font size styles have proper specificity */
}