/**
 * Electrikman Tools 1.56.2: mobile UX corrections.
 *
 * Verified using the exact 1.56.1 source archive plus public-page browser
 * regressions at 320, 360, 390, 768 and 1024 CSS pixels.
 * Selectors are intentionally scoped to individual calculators and the
 * identified Elementor template widget.
 */

/* IPv4/CIDR: prevent labels and numeric values from running together. */
.emt-calculator.emt-ipv4 .emt-result__metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.emt-calculator.emt-ipv4 .emt-result__metric > strong,
.emt-calculator.emt-ipv4 .emt-result__metric > small {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Ohm's law: unit dropdown must not squeeze the numeric field. */
.emt-calculator.emt-ohms .emt-input-combo > input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
}

.emt-calculator.emt-ohms .emt-input-combo > select {
    flex: 0 0 86px;
    width: 86px;
    min-width: 86px;
    max-width: 86px;
}

@media (max-width: 767px) {
    /* Elementor's inherited justified text is unsuitable for tool guidance. */
    .emt-calculator {
        text-align: left !important;
    }

    /* In-tool sticky menus must not overlap the Kadence mobile header. */
    .em-panel-nav,
    .em-pathway-nav,
    .empp-nav,
    .em-ev-nav,
    .emvr-nav,
    .em-vs-nav,
    .emsolar-nav {
        position: static !important;
        top: auto !important;
    }

    /* Remove the proven 174px empty Spacer in Elementor template 23103. */
    .elementor-23103 .elementor-element.elementor-element-2b9e6f3 {
        display: none !important;
    }
}

@media (max-width: 359px) {
    /* Home EV charging: long kWh/100km suffix leaves only 46.5px for input. */
    .emt-calculator.emt-home-ev [data-distance-block] > .emt-field:last-child .emt-input-unit {
        grid-template-columns: minmax(0, 1fr);
    }

    .emt-calculator.emt-home-ev [data-distance-block] > .emt-field:last-child .emt-input-unit > b {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }
}

/* Teclast landscape / tablet CSS width 768–1279px: Elementor 23103
 * reserves 250px of empty space above calculators. Preserve the existing
 * <=767px phone rule; do not change desktop widths >=1280px. */
@media (min-width: 768px) and (max-width: 1279px) {
    .elementor-23103 .elementor-element.elementor-element-2b9e6f3 {
        display: none !important;
    }
}