/* RCore Additional Options - WooCommerce Variation Matching Styling */

:root {
    --rcore-ao-accent-color: var(--e-global-color-accent, #61ce70);
    --rcore-ao-text-color: var(--e-global-color-text, #333);
    --rcore-ao-secondary-color: var(--e-global-color-secondary, #777);
    --rcore-ao-label-bg: #f5f5f5;
    /* Light grey background for labels */
    --rcore-ao-border-color: #eee;
}

/* 
   Note: These rows are moved into the theme's table.variations 
   The theme usually has its own table styling, so we only apply what's necessary.
*/

tr.rcore-ao-option-row td,
tr.rcore-ao-option-row th {
    padding: 15px 10px;
    border-bottom: 1px solid var(--rcore-ao-border-color);
    vertical-align: middle;
}

/* Ensure our labels match the theme's variation labels */
tr.rcore-ao-option-row th.label {
    background-color: var(--rcore-ao-label-bg);
    width: 30%;
    /* Standard WooCommerce variation label width */
    font-weight: 700;
    color: var(--rcore-ao-text-color);
    text-transform: none;
    line-height: 1.2;
    text-align: left;
}

tr.rcore-ao-option-row th.label label {
    margin: 0;
    display: block;
    cursor: pointer;
}

/* Price Sub-label */
.rcore-ao-price {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    color: var(--rcore-ao-secondary-color);
    margin-top: 4px;
}

/* Value Styling */
tr.rcore-ao-option-row td.value {
    padding-left: 20px;
}

/* Required field indicator */
abbr.required {
    color: #d63638;
    text-decoration: none;
    border: none;
    margin-left: 4px;
}

/* Dropdown & Text Select Styling */
.rcore-ao-select,
.rcore-ao-input-text {
    width: auto;
    max-width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    background-color: #fff;
    color: #444;
    font-size: 14px;
    transition: border-color 0.2s;
}

.rcore-ao-input-text {
    width: 100%;
    min-width: 200px;
}

.rcore-ao-select {
    padding-right: 35px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.175 4 2.59 2.585 6 5.99l3.41-3.405L10.825 4 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.rcore-ao-select:focus,
.rcore-ao-input-text:focus {
    outline: none;
    border-color: #777;
}

/* Switcher Styling for Table Integration */
.elementor-switch {
    display: inline-block;
    width: 44px;
    height: 22px;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

.elementor-switch-input {
    display: none;
}

.elementor-switch-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ddd;
    border-radius: 34px;
    transition: background-color 0.3s;
}

.elementor-switch-handle {
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.elementor-switch-input:checked+.elementor-switch-label {
    background-color: var(--rcore-ao-accent-color);
}

.elementor-switch-input:checked~.elementor-switch-handle {
    transform: translateX(22px);
}