/* ScriptFlow Product Options — Frontend */

.scriptflow-product-options {
    margin-bottom: 20px;
}

.scriptflow-option-group {
    margin-bottom: 18px;
}

/* Label */
.scriptflow-option-label {
    display: block;
    font-size: var(--spo-label-font-size, 13px);
    font-weight: var(--spo-label-font-weight, 600);
    color: var(--spo-label-color, #1a1a1a);
    margin-bottom: 8px;
}

.scriptflow-required {
    color: #e00;
    margin-left: 1px;
}

/* Button group */
.scriptflow-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spo-btn-gap, 6px);
}

/* Buttons */
.scriptflow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--spo-btn-min-width, 44px);
    height: var(--spo-btn-height, 38px);
    padding: 0 14px;
    border: var(--spo-btn-border-width, 1px) solid var(--spo-btn-border, #ddd);
    background: var(--spo-btn-bg, #fff);
    color: var(--spo-btn-text, #333);
    font-size: var(--spo-btn-font-size, 14px);
    font-weight: var(--spo-btn-font-weight, 400);
    font-family: inherit;
    border-radius: var(--spo-btn-radius, 3px);
    cursor: pointer;
    line-height: 1;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.scriptflow-btn:hover {
    border-color: var(--spo-btn-hover-border, #333);
}

.scriptflow-btn.selected,
.scriptflow-btn[aria-pressed="true"] {
    background: var(--spo-btn-selected-bg, #1a1a1a);
    color: var(--spo-btn-selected-text, #fff);
    border-color: var(--spo-btn-selected-border, #1a1a1a);
}

/* Dropdown — inherits WooCommerce styles, no override */
.scriptflow-select {
    display: block;
    width: auto;
    min-width: 160px;
}

/* Error state */
.scriptflow-has-error .scriptflow-option-label {
    color: #c0392b;
}

.scriptflow-has-error .scriptflow-btn-group,
.scriptflow-has-error .scriptflow-select {
    outline: 1px solid #c0392b;
    border-radius: var(--spo-btn-radius, 3px);
}

.scriptflow-error {
    color: #c0392b;
    font-size: 0.8125rem;
    margin: 5px 0 0;
}

/* Disabled Add to Cart state */
.single_add_to_cart_button.spo-disabled,
.single_add_to_cart_button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto; /* keep tooltip visible on hover */
}

/* Clear button */
.scriptflow-clear-row {
    margin-top: 4px;
    margin-bottom: 8px;
}

.scriptflow-clear-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8125rem;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    line-height: 1;
    transition: color 0.15s ease;
}

.scriptflow-clear-btn:hover {
    color: #333;
}
