/* Frontend Styles for Woo Extra Product Fields */
.wepf-product-fields {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid var(--wepf-border-color, #e2e8f0);
    font-family: var(--wepf-font-family, inherit);
    font-size: var(--wepf-font-size, 14px);
    color: var(--wepf-label-color, #0f172a);
}

.wepf-field-group h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: var(--wepf-font-weight, 600);
}

.wepf-field {
    margin-bottom: 15px;
}

.wepf-conditional-field {
    display: none;
}

.wepf-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: var(--wepf-font-weight, 600);
    font-size: var(--wepf-font-size, 14px);
    color: var(--wepf-label-color, #0f172a);
}

.wepf-field label .required {
    color: #e2401c;
    text-decoration: none;
    font-weight: bold;
}

.wepf-price-modifier {
    color: var(--wepf-primary-color, #2271b1);
    font-weight: var(--wepf-font-weight, 600);
    margin-left: 4px;
}

/* Inputs */
.wepf-input-text,
.wepf-input-select,
.wepf-input-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--wepf-border-color, #d1d5db);
    border-radius: 4px;
    background-color: var(--wepf-bg-color, #fff);
    font-size: var(--wepf-font-size, 14px);
    color: var(--wepf-label-color, #0f172a);
    transition: border-color 0.2s;
    font-family: inherit;
}

.wepf-input-text:focus,
.wepf-input-select:focus,
.wepf-input-textarea:focus {
    border-color: var(--wepf-primary-color, #2271b1);
    outline: none;
    box-shadow: 0 0 0 1px var(--wepf-primary-color, #2271b1);
}

/* Checkboxes */
.wepf-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wepf-checkboxes label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
}

.wepf-checkboxes input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--wepf-primary-color, #2271b1);
}

/* Image Swatches */
.wepf-image-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wepf-swatch {
    width: var(--wepf-swatch-width, 80px);
    border: 2px solid var(--wepf-border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    background: var(--wepf-bg-color, #fff);
}

.wepf-swatch-img-wrap {
    width: 100%;
    height: var(--wepf-swatch-height, 80px);
    overflow: hidden;
    border-bottom: 2px solid var(--wepf-border-color, #e2e8f0);
}

.wepf-swatch-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wepf-swatch-info {
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
}

.wepf-swatch-title {
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.2;
    color: var(--wepf-label-color, #0f172a);
}

.wepf-swatch-price {
    font-size: 0.75em;
    color: var(--wepf-primary-color, #007ab8);
    font-weight: 700;
}

.wepf-swatch:hover {
    border-color: var(--wepf-primary-color, #94a3b8);
}

.wepf-swatch.active {
    border-color: var(--wepf-primary-color, #007ab8);
    box-shadow: 0 0 0 1px var(--wepf-primary-color, #007ab8);
}

.wepf-swatch.active .wepf-swatch-img-wrap {
    border-bottom-color: var(--wepf-primary-color, #007ab8);
}

.wepf-clear {
    clear: both;
}

/* Button Style for Options */
.wepf-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 5px;
}

.wepf-button-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    user-select: none;
}

.wepf-button-option:hover {
    border-color: #cbd5e1;
}

.wepf-button-option.active {
    border-color: var(--wepf-primary-color, #007ab8) !important;
    background-color: color-mix(in srgb, var(--wepf-primary-color, #007ab8) 5%, transparent) !important;
    color: var(--wepf-primary-color, #007ab8) !important;
    box-shadow: none !important;
}

.wepf-button-option .wepf-price-modifier {
    font-size: 0.85em;
    opacity: 0.8;
}

.wepf-button-option.active .wepf-price-modifier {
    color: var(--wepf-primary-color, #007ab8) !important;
}

/* #custom-live-price — Total Price box above Add to Cart (hidden until variation selected) */
#custom-live-price {
    margin: 22px 0 15px;
    padding: 14px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--wepf-primary-color, #007ab8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

#custom-live-price strong {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

#custom-live-price .amount {
    color: var(--wepf-primary-color, #007ab8);
    font-weight: 800;
    font-size: 1.25rem;
}

/* Conditional Field Hidden State */
/* Force Black Color for Cart and Order Meta */
.cart_item .variation,
.wc-item-meta,
.wc-item-meta-label,
.wc-item-meta strong,
.variation dt,
.variation dd {
    color: #000000 !important;
}

.cart_item .variation dt,
.wc-item-meta-label {
    font-weight: bold !important;
}

/* Ensure strong tags in order items are actually bold */
.wc-item-meta strong,
.variation strong {
    font-weight: bold !important;
    display: inline !important;
}
