/* Make the number input arrows visible at all times */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: .7 !important;
    width: 40px !important;
    height: 30px;
    padding: 5px 25px 5px 5px;
}

#ella_acf_adjustment_warning {
    text-align: center;
    margin-bottom: 5%;
    margin-top: -2%;
}

#reset_main_dimensions:hover,
#reset_custom_dimensions:hover {
    color: #344ea3;
}

#reset_main_dimensions,
#reset_custom_dimensions {
    color: #4A6CD8;
    text-align: right;
    font-size: 16px;
    display: block;
    margin-top: -3%;
}

.ella-acf-field {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.ella-acf-field input {
    width: 100%;
    text-align: center;
    font-size: 20px;
}

.ella-acf-field-price {
    flex: 1;
    margin-left: 10px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
}

/* --- IMPORTANT FIX FOR SHORTCODE / BRAND PAGE --- */
/* On calculator shortcodes, always show the variation area that
   contains our custom dimension inputs, even if the theme or
   Woo's JS tries to hide it until a variation is chosen. */
.ella-acf-builder--calculator .single_variation_wrap,
.ella-acf-builder--calculator .woocommerce-variation-add-to-cart {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
}

/* Mobile tweaks */
@media (max-width: 768px) {

    .ella-acf-field-price {
        margin-top: -4%;
    }

    #ella_acf_adjustment_warning {
        text-align: center;
        margin-bottom: 5%;
        margin-top: 1%;
    }

    #reset_main_dimensions,
    #reset_custom_dimensions {
        margin-top: 5% !important;
    }

    #reset_custom_dimensions {
        margin-bottom: 10%;
    }

    .ella-acf-fields-row {
        flex-wrap: wrap;
    }

    .ella-acf-field-price {
        flex: 1 0 100% !important;
        justify-content: center;
        margin-left: 0;
    }

    .ella-acf-field-price + .adjustment-warning {
        order: -1;
        margin-bottom: 10px;
    }
}

#custom_price_display.loading {
    animation: strong-pulse 1.5s infinite;
}

@keyframes strong-pulse {
    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

.woocommerce-Price-amount.loading {
    animation: strong-pulse2 1.5s infinite;
}

@keyframes strong-pulse2 {
    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

/* Calculator-only mode for shortcode:
   hide quantity + add-to-cart so the builder acts like a "playable" calculator. */
.ella-acf-builder--calculator .quantity,
.ella-acf-builder--calculator .single_add_to_cart_button {
    display: none !important;
}


/* SHORTCODE */

/* Helper Text */
.ella-acf-builder-wrapper .ella-acf-field .helper-text {
    bottom: -15px !important;
    margin-top: -1% !important;
}

/* Warning */

.ella-acf-builder-wrapper #ella_acf_adjustment_warning {
  margin-top: 20px!important;
  margin-bottom: 30px!important;
}

/* Callout Button */
.ella-acf-builder-wrapper .calloutz {
  display: none!important;
}

/* Select */
.ella-acf-builder-wrapper select:hover {
  cursor:pointer!important;
}
  
/* Input */
.ella-acf-builder-wrapper input {
  height: 50px!important;
  font-size:18px!important;
}

.ella-acf-builder-wrapper label {
    font-size:15px!important;
}

#reset_custom_dimensions {
    margin-top:0%!important;
}

/* Ella ACF – ensure consistent styling for inputs & selects, even on dealer themes */
.ella-acf-builder-wrapper select,
.ella-acf-builder-wrapper .ella-acf-field .woocommerce-input-wrapper input[type="number"],
.ella-acf-builder-wrapper .ella-acf-field .woocommerce-input-wrapper input[type="text"] {
    background-color: #f6f6f6;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
    padding: 6px 8px;
    color: #333;
}

/* Dropdown arrow styling – force visible arrow on all embedded calculators,
   with a bit of breathing room on the right side. */
.ella-acf-builder-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* extra space so the chevron isn’t hugging the border */
    padding-right: 2.75em;

    /* little "chevron" + divider line */
    background-image:
        linear-gradient(45deg, transparent 50%, #555 50%),
        linear-gradient(135deg, #555 50%, transparent 50%),
        linear-gradient(to right, #d9d9d9, #d9d9d9);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%,
        calc(100% - 2.5em) 50%;
    background-size: 5px 5px, 5px 5px, 1px 60%;
    background-repeat: no-repeat;
}

/* Hide old IE arrow if present */
.ella-acf-builder-wrapper select::-ms-expand {
    display: none;
}

/* Focus state */
.ella-acf-builder-wrapper select:focus,
.ella-acf-builder-wrapper .ella-acf-field .woocommerce-input-wrapper input[type="number"]:focus,
.ella-acf-builder-wrapper .ella-acf-field .woocommerce-input-wrapper input[type="text"]:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #2c61ab;
    box-shadow: 0 0 0 1px rgba(44, 97, 171, 0.25);
}

/* Helper text positioning for embedded/shortcode + EllaSync */
.ella-acf-builder-wrapper .helper-text {
    display: block;
    position: absolute;
    bottom: -15px;
    left: 0;
    font-size: 14px;
    color: #404040;
}

/* Mobile */
@media only screen and (max-width:1001px) {
.ella-acf-field-price {
  margin-top: 5%!important;
}
}

/* Remove dotted underline / help cursor from required asterisks
   inside the Ella ACF builder wrapper */
.ella-acf-builder-wrapper abbr.required[title],
.ella-acf-builder-wrapper label abbr[title] {
    border-bottom: none;
    text-decoration: none;
    cursor: inherit; /* no question-mark cursor */
}
