/* ============================================================
   UNIVERSAL THEME-INHERITING FORM STYLES
   ============================================================ */

.ezhp-compatibility-block .ezhp-form {
    margin: 1.25rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    background: transparent !important;
}

/* Dropdowns fully inherit theme styles */
.ezhp-compatibility-block select {
    font: inherit;
    color: inherit;
    background: inherit;
    border: 1px solid currentColor;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

/* Force symbol-compatible fonts for zodiac glyphs */
.ezhp-compatibility-block select option {
    font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", 
                 "Noto Sans Symbols", "Segoe UI Emoji", "Apple Color Emoji", 
                 "Symbola", system-ui, sans-serif;
}

/* Button inherits theme button styles */
.ezhp-compatibility-block .wp-element-button,
.ezhp-compatibility-block .ezhp-fetch-button {
    font: inherit !important;
    color: inherit !important;
    background: inherit !important;
    border: 1px solid currentColor !important;
    padding: var(--wp--custom--button--padding, 0.5rem 1rem) !important;
    border-radius: inherit !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ezhp-compatibility-block .ezhp-fetch-button:hover {
    opacity: 0.8;
}

/* Result container spacing */
.ezhp-compatibility-block .ezhp-compatibility-result {
    margin-top: 1rem;
}

/* ============================================================
   TYPOGRAPHY — FULLY INHERITED FROM THE THEME
   ============================================================ */
.ezhp-compatibility-block h2,
.ezhhp-compatibility-block h3,
.ezhp-compatibility-block p,
.ezhp-compatibility-block ul,
.ezhp-compatibility-block li {
    font-family: inherit;
    color: inherit;
    line-height: 1.65;
}

/* Improve list spacing */
.ezhp-compatibility-block ul {
    margin-left: 1.1rem;
}

.ezhp-compatibility-block li {
    margin-bottom: 0.5rem;
}

/* ============================================================
   INLINE HERO IMAGE SUPPORT
   ============================================================ */
.ez-inline-hero img {
    display: block;
    height: auto;
    border-radius: 8px;
}

/* Force wrap-right to work regardless of theme styles */
.ez-inline-hero-img.ez-wrap-left {
    float: left !important;
    margin: 0 1rem 1rem 0 !important;
}

.ez-inline-hero-img.ez-wrap-right {
    float: right !important;
    margin: 0 0 1rem 1rem !important;
}

/* Clear floats only after the *content*, not the wrapper or image */
.ezhp-compatibility-result::after {
    content: "";
    display: block;
    clear: both;
}

/* Disable theme unicode-bidi isolation so float-right can work */
.ezhp-compatibility-block .section {
    unicode-bidi: normal !important;
}

/* ===========================================
   INDEFINITE PROGRESS BAR (Compatibility Loading)
   =========================================== */

.ezhp-compatibility-block .ezhp-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.15);
    overflow: hidden;
    border-radius: 4px;
    margin: 1rem 0;
    position: relative;
}

.ezhp-compatibility-block .ezhp-progress-bar {
    position: absolute;
    height: 100%;
    width: 30%;
    background: var(--wp--preset--color--primary, #007cba);
    border-radius: 4px;
    animation: ezhp-progress-slide 1.2s linear infinite;
}

@keyframes ezhp-progress-slide {
    0%   { left: -30%; }
    100% { left: 100%; }
}

/* ===========================================
   RTL (Right-to-Left) SUPPORT
   =========================================== */

/* RTL text alignment and direction */
.ezhp-compatibility-block[dir="rtl"] {
    text-align: right;
}

.ezhp-compatibility-block[dir="rtl"] .ezhp-form {
    flex-direction: row-reverse;
}

/* RTL list indentation */
.ezhp-compatibility-block[dir="rtl"] ul {
    margin-left: 0;
    margin-right: 1.1rem;
}

/* RTL inline hero image float reversal */
.ezhp-compatibility-block[dir="rtl"] .ez-inline-hero-img.ez-wrap-left {
    float: right !important;
    margin: 0 0 1rem 1rem !important;
}

.ezhp-compatibility-block[dir="rtl"] .ez-inline-hero-img.ez-wrap-right {
    float: left !important;
    margin: 0 1rem 1rem 0 !important;
}

/* RTL progress bar animation (reverse direction) */
.ezhp-compatibility-block[dir="rtl"] .ezhp-progress-bar {
    animation: ezhp-progress-slide-rtl 1.2s linear infinite;
}

@keyframes ezhp-progress-slide-rtl {
    0%   { right: -30%; left: auto; }
    100% { right: 100%; left: auto; }
}