/* ============================================
   VARIATION BUTTONS - Flat Layout Style
   ============================================ */

/* CRITICAL: Hide original dropdown with highest priority */
html body.woocommerce div.product form.variations_form table.variations select.variation-select-hidden,
html body.woocommerce div.product form.variations_form select.variation-select-hidden,
.variations_form select.variation-select-hidden,
.variation-select-hidden,
table.variations select.variation-select-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Also hide any select that has a button wrapper sibling */
.variation-buttons-wrapper + select,
.variation-buttons-wrapper ~ select {
    display: none !important;
}

/* Button wrapper - horizontal layout */
.variation-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
}

/* Individual variation button - ELLIPTICAL/OVAL shape */
.variation-button {
    min-width: 90px;
    height: 46px;
    padding: 0 28px;
    border: 2px solid #e0e0e0;
    border-radius: 23px; /* Half of height = perfect oval */
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Hover state */
.variation-button:hover {
    border-color: #999;
    background: #fafafa;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Active/Selected state - BLACK */
.variation-button.active {
    border-color: #000;
    background: #000;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

/* Focus state */
.variation-button:focus {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

/* Disabled state */
.variation-button.disabled,
.variation-button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
    background: #f5f5f5;
}

/* Table layout adjustments */
table.variations {
    width: 100%;
    border-collapse: collapse;
}

table.variations tr {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 15px;
}

table.variations td.value {
    display: block;
    flex: 1;
}

/* Ensure labels are visible */
table.variations th.label {
    display: block;
    min-width: 100px;
    padding-top: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

table.variations th.label label {
    margin-bottom: 0;
}

table.variations th.label label:after {
    content: ":";
    margin-left: 3px;
}

/* ============================================
   Product Selling Points Styles
   ============================================ */
.product-selling-points {
    margin: 20px 0;
    padding: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    border-radius: 8px;
}

.selling-point-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.selling-point-item:last-child {
    margin-bottom: 0;
}

.selling-point-icon {
    margin-right: 12px;
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.selling-point-icon svg {
    width: 20px;
    height: 20px;
}

.selling-point-text {
    font-weight: 500;
    line-height: 1.4;
}

/* ============================================
   Clear variations link
   ============================================ */
.wd-reset-var {
    margin-top: 15px;
}

.wd-reset-var .reset_variations {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.wd-reset-var .reset_variations:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .variation-button {
        min-width: 80px;
        height: 42px;
        padding: 0 22px;
        border-radius: 21px;
        font-size: 13px;
    }
    
    table.variations tr {
        flex-direction: column;
    }
    
    table.variations th.label {
        padding-bottom: 8px;
    }
}
