.ep-walt-message a,
.ep-walt-message a:visited {
    color: #0000ee !important;
    text-decoration: underline !important;
    text-underline-offset: 0.12em;
}

.ep-walt-message a:hover,
.ep-walt-message a:focus {
    color: #0000aa !important;
    text-decoration: underline !important;
}

/* Use the same type and link styling as the site's ring sizer. */
form.variations_form .ep-walt-attribute-help {
    display: block;
    clear: both;
    flex: 0 0 100%;
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding: 0;
    text-align: left;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

form.variations_form .ep-walt-attribute-help,
form.variations_form .ep-walt-attribute-help a {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    color: #174b6b !important;
}

form.variations_form .ep-walt-attribute-help a {
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3px !important;
}

form.variations_form .ep-walt-attribute-help a:hover,
form.variations_form .ep-walt-attribute-help a:focus-visible {
    color: #0e3046 !important;
}

form.variations_form .ep-walt-attribute-help a:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 3px;
}

/* Keep the lead-time block on its own row above quantity/add-to-cart.
 * The parent class is added only when this plugin's message is present. */
.ep-walt-layout {
    flex-wrap: wrap !important;
}

.ep-walt-layout > .ep-walt-message {
    box-sizing: border-box;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100%;
    margin: 0 0 12px 0 !important;
}


/* Optional SVG icon shown immediately before the lead-time text.
 * Keep the icon inline with the first text line. !important is intentional here:
 * several WooCommerce/Elementor themes apply more specific global img rules
 * (for example height:auto), which would otherwise shrink SVGs with non-square viewBox. */
.ep-walt-message.ep-walt-has-icon {
    display: block;
}

.ep-walt-message-icon {
    display: inline-block !important;
    height: 1em !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    object-fit: contain;
    vertical-align: -0.12em;
    margin: 0 0.35em 0 0 !important;
}

.ep-walt-message-text {
    min-width: 0;
    display: inline;
}

/* Slightly smaller, bold text for the user-configured message only.
 * The class is printed on both simple and variable product message placeholders.
 * Inheritance keeps the optional 1em SVG icon proportional to the font. */
.ep-walt-message.ep-walt-custom-mode {
    font-size: 0.90em !important;
    font-weight: 700 !important;
}
.ep-walt-message.ep-walt-custom-mode .ep-walt-message-text,
.ep-walt-message.ep-walt-custom-mode .ep-walt-message-text a {
    font-size: inherit !important;
    font-weight: 700 !important;
}

/* Optional selections are kept on their own row; no global WooCommerce form overrides. */
#ep-walt-addon-groups {box-sizing:border-box; width:100%;flex:0 0 100%;min-width:0;margin:0 0 14px}
#ep-walt-addon-groups[hidden],#ep-walt-addon-groups [hidden] {display:none!important}
#ep-walt-addon-groups .ep-walt-addon-group {border:1px solid #ddd;padding:10px 12px;margin:8px 0;min-width:0}
#ep-walt-addon-groups .ep-walt-addon-group legend {font-weight:600;font-size:1em;margin:0;padding:0 5px}
#ep-walt-addon-groups .ep-walt-addon-description {margin:3px 0 9px;font-size:.92em}
#ep-walt-addon-groups .ep-walt-addon-choice {display:block;margin:7px 0;cursor:pointer;font-size:.95em}
#ep-walt-addon-groups .ep-walt-addon-choice input {margin:0 6px 0 0;vertical-align:middle}
#ep-walt-addon-groups .ep-walt-addon-surcharge {font-size:.92em;white-space:normal}
#ep-walt-addon-groups .ep-walt-addon-choice-input {max-width:100%}
#ep-walt-addon-groups .ep-walt-addon-warning {color:#9f2b19;font-size:.93em;margin:7px 0}

/* Add-on choices optionally displayed below their controlling variation attribute.
 * Limit layout to the plugin fieldset; do not affect WooCommerce/Elementor swatches. */
form.cart td.value > .ep-walt-addon-group.ep-walt-addon-group-inline,
form.cart td > .ep-walt-addon-group.ep-walt-addon-group-inline {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #ddd;
    margin: 12px 0 6px;
}
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline[hidden] {
    display: none !important;
}
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline legend {
    font-weight: 600;
    font-size: 1em;
    padding: 0 5px;
}
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline .ep-walt-addon-choice {
    display: block;
    margin: 7px 0;
    cursor: pointer;
}
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline .ep-walt-addon-choice input {
    margin: 0 6px 0 0;
    vertical-align: middle;
}
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline .ep-walt-addon-choice-input { max-width: 100%; }
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline .ep-walt-addon-surcharge { font-size: .92em; }
form.cart .ep-walt-addon-group.ep-walt-addon-group-inline .ep-walt-addon-description { margin: 3px 0 9px; font-size: .92em; }

/* v1.3.5 — Per-group optional frontend appearance. The CSS variables are set
 * only by the plugin after strict allowlist validation in PHP. */
form.cart fieldset.ep-walt-addon-group {
    font-size: var(--ep-walt-addon-font-size, inherit) !important;
    width: var(--ep-walt-addon-box-width, 100%) !important;
    max-width: 100% !important;
}
form.cart fieldset.ep-walt-addon-group legend {
    font-size: 1em !important;
}
form.cart fieldset.ep-walt-addon-group .ep-walt-addon-choice {
    font-size: 0.95em;
}
form.cart fieldset.ep-walt-addon-group.ep-walt-addon-density-compact {
    padding: 4px 8px !important;
    margin-top: 5px !important;
    margin-bottom: 4px !important;
}
form.cart fieldset.ep-walt-addon-group.ep-walt-addon-density-compact .ep-walt-addon-choice {
    margin: 2px 0 !important;
    line-height: 1.3;
}
form.cart fieldset.ep-walt-addon-group.ep-walt-addon-density-compact .ep-walt-addon-description {
    margin: 2px 0 4px !important;
}
form.cart fieldset.ep-walt-addon-group.ep-walt-addon-density-spacious {
    padding: 14px 16px !important;
    margin-top: 14px !important;
    margin-bottom: 10px !important;
}
form.cart fieldset.ep-walt-addon-group.ep-walt-addon-density-spacious .ep-walt-addon-choice {
    margin: 10px 0 !important;
    line-height: 1.5;
}
/* Keep the controls legible on phones even if the desktop width is reduced. */
@media (max-width: 767px) {
    form.cart fieldset.ep-walt-addon-group {
        width: 100% !important;
    }
}
