/* Compact product options in the existing WooCommerce add-to-cart form.
   No Avada overrides or extra form panels. */
.wcf-product-fields,
.wcf-product-fields * { box-sizing: border-box; }

.wcf-product-fields {
    --wcf-control-height: 48px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 0;
}

.wcf-product-fields .wcf-field {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.wcf-product-fields .wcf-field-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 5px;
    line-height: 1.35;
}

.wcf-product-fields .wcf-field-heading > label,
.wcf-product-fields .wcf-field-heading > .wcf-field-title {
    display: inline;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    float: none;
    font-size: .9em;
    font-weight: 600;
    line-height: 1.35;
}

.wcf-product-fields .wcf-input,
.wcf-product-fields input.wcf-input,
.wcf-product-fields select.wcf-input,
.wcf-product-fields textarea.wcf-input {
    display: block;
    position: relative;
    float: none;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: var(--wcf-control-height);
    min-height: 0;
    margin: 0;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 8px;
}

.wcf-product-fields .wcf-textarea-wrap {
    display: block;
    position: relative;
    width: 100%;
}

.wcf-product-fields textarea.wcf-textarea {
    height: auto;
    min-height: 76px;
    resize: vertical;
}

.wcf-product-fields .wcf-has-counter textarea.wcf-textarea {
    padding-bottom: 27px;
}

/* Character counter is INSIDE the textarea, never a separate line. */
.wcf-product-fields .wcf-counter {
    position: absolute;
    z-index: 1;
    right: 12px;
    bottom: 7px;
    display: block;
    margin: 0;
    padding: 0 3px;
    font-size: 11px;
    line-height: 1.3;
    opacity: .65;
    pointer-events: none;
    background: transparent;
}

.wcf-product-fields .wcf-choices,
.wcf-product-fields .wcf-single-check {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 15px;
    min-height: 28px;
    padding: 3px 0;
}

.wcf-product-fields .wcf-choice {
    display: inline-flex;
    float: none;
    align-items: center;
    gap: 7px;
    width: auto;
    margin: 0;
    padding: 0;
    font-weight: 400;
    font-size: .9em;
    line-height: 1.4;
    cursor: pointer;
}

.wcf-product-fields .wcf-choice input[type="checkbox"],
.wcf-product-fields .wcf-choice input[type="radio"] {
    appearance: auto;
    display: inline-block;
    position: static;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

/* A small accessible (?) beside the label, with help only on hover/focus. */
.wcf-product-fields .wcf-tip {
    display: inline-flex;
    position: relative;
    flex: 0 0 auto;
    align-items: center;
    vertical-align: middle;
}

.wcf-product-fields .wcf-tip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 11px;
    line-height: 1;
    opacity: .65;
    cursor: help;
}

.wcf-product-fields .wcf-tip-trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wcf-product-fields .wcf-tip-content {
    display: none;
    position: absolute;
    z-index: 999;
    bottom: calc(100% + 7px);
    left: 0;
    width: max-content;
    max-width: min(250px, 75vw);
    padding: 8px 10px;
    border-radius: 6px;
    background: #2f2c29;
    color: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.13);
    font-size: 12px;
    line-height: 1.45;
    white-space: normal;
    font-weight: 400;
    pointer-events: none;
}

.wcf-product-fields .wcf-tip:hover .wcf-tip-content,
.wcf-product-fields .wcf-tip:focus-within .wcf-tip-content { display: block; }

@media (max-width: 600px) {
    .wcf-product-fields { gap: 8px; margin-bottom: 8px; }
    .wcf-product-fields .wcf-tip-content { left: auto; right: -8px; }
}

/* Stay close to the theme's quantity selector when it follows these options. */
.single-product form.cart .wcf-product-fields + .quantity { margin-top: 0 !important; }


/* WCF inline validation */
.wcf-product-fields .wcf-validation-error {
    color: #b42318;
    font-size: 12px;
    margin-top: 5px;
}

.wcf-product-fields .wcf-validation-error[hidden] {
    display: none;
}

.wcf-product-fields .wcf-invalid .wcf-input {
    border-color: #b42318 !important;
}
