/**
 * RealMeats Final Weight Orders — minimal presentation layer.
 *
 * Intentionally restrained so the plugin inherits RealMeats/Dokan/Divi styling
 * rather than creating a parallel visual system.
 */
.rmfw-product-fields[style*="display: none"] {
    display: none;
}

.rmfw-estimate-preview,
.rmfw-public-summary,
.rmfw-order-item {
    margin-top: 12px;
}

.rmfw-public-summary {
    padding: 12px 14px;
    border-left: 3px solid currentColor;
}

.rmfw-public-summary p {
    margin: 0 0 5px;
}

.rmfw-public-summary .rmfw-public-note {
    margin-top: 8px;
    font-size: 0.92em;
}

.rmfw-order-item {
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

.rmfw-order-item + .rmfw-order-item {
    margin-top: 18px;
}

.rmfw-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 12px;
}

.rmfw-live-preview {
    margin: 10px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

.rmfw-confirm-label {
    display: block;
    margin: 12px 0;
}

.rmfw-ajax-message {
    margin-top: 8px;
    font-weight: 600;
}

.rmfw-success {
    color: #22712f;
}

.rmfw-error {
    color: #b32d2e;
}

/* v0.1.2 editor controls are scoped; do not inherit Woo's floated label layout. */
.rmfw-editor {
    clear: both;
    box-sizing: border-box;
    padding: 16px;
    margin: 14px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    max-width: 960px;
}
.rmfw-editor *, .rmfw-editor *::before, .rmfw-editor *::after { box-sizing: border-box; }
.rmfw-editor [hidden], .rmfw-order-item [hidden] { display: none !important; }
.woocommerce_options_panel .form-field[hidden], .dokan-form-group[hidden],
.woocommerce_options_panel .sale_price_dates_fields[hidden], .sale_schedule[hidden],
.cancel_sale_schedule[hidden], .dokan-input-group[hidden] { display: none !important; }
.rmfw-editor label, .woocommerce_options_panel .rmfw-editor label {
    display: block;
    float: none !important;
    width: auto !important;
    margin: 0 0 6px !important;
    line-height: 1.5;
    font-size: 13px;
    font-weight: 600;
}
.rmfw-editor .rmfw-toggle, .woocommerce_options_panel .rmfw-editor .rmfw-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.rmfw-editor input[type="checkbox"] { width: 16px !important; flex: 0 0 16px; margin: 3px 0 0 !important; float: none !important; }
.rmfw-editor .rmfw-product-fields { padding: 0; margin: 0; border: 0; min-width: 0; }
.rmfw-editor .rmfw-editor-note {
    padding: 14px 16px;
    margin: 14px 0;
    border-left: 4px solid #1d5368;
    background: #f0f6f8;
    color: #1d2327;
    border-radius: 3px;
    line-height: 1.6;
}
.rmfw-editor .rmfw-editor-note p { padding: 0; margin: 6px 0 0; line-height: 1.6; }
.rmfw-editor .rmfw-fields-grid { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.rmfw-editor .rmfw-field { flex: 1 1 300px; min-width: 0; }
.rmfw-editor .rmfw-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    min-height: 42px;
    overflow: hidden;
}
.rmfw-editor .rmfw-input-wrap:focus-within { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; }
.rmfw-editor .rmfw-input-wrap input, .woocommerce_options_panel .rmfw-editor .rmfw-input-wrap input {
    float: none !important;
    flex: 1 1 80px;
    width: 100% !important;
    min-width: 0;
    max-width: none;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    height: 42px;
    padding: 8px 10px;
    background: transparent;
    color: #1d2327;
    font-size: 16px;
}
.rmfw-editor .rmfw-unit { flex: 0 0 auto; padding: 0 10px; font-weight: 600; color: #50575e; white-space: nowrap; }
.rmfw-editor .rmfw-help { padding: 0; margin: 5px 0 0; line-height: 1.5; font-size: 12px; color: #50575e; }
.rmfw-editor .rmfw-estimate-preview { padding: 14px 16px; margin: 16px 0 0; background: #f6f7f7; border-radius: 4px; }
.rmfw-editor .rmfw-estimate-preview output { display: block; font-size: 22px; font-weight: 700; color: #1d5368; margin: 5px 0; }
.rmfw-editor .rmfw-estimate-preview small { display: block; }
.rmfw-editor .rmfw-validation-message { margin-top: 10px; color: #8a2424; font-weight: 600; }
.rmfw-warning-panel { padding: 14px 16px; margin-top: 14px; border-left: 4px solid #996800; background: #fff8e5; color: #3c2f10; }
.rmfw-warning-panel ul { list-style: disc; margin: 8px 0 12px 20px; }
.rmfw-editor .rmfw-reason-label { margin-top: 10px !important; }
.rmfw-editor .rmfw-reason-label input, .woocommerce_options_panel .rmfw-editor .rmfw-reason-label input { display: block; float: none; width: 100%; max-width: 100%; }
.rmfw-audit-order { clear: both; }
@media (max-width: 600px) {
    .rmfw-editor { margin: 10px 0; padding: 12px; }
    .rmfw-editor .rmfw-field { flex-basis: 100%; }
    .rmfw-editor .rmfw-fields-grid { gap: 12px; }
    .rmfw-editor .rmfw-estimate-preview output { font-size: 20px; }
}


/* v0.1.4: hide only native elements explicitly marked by our form adapter.
 * Keep labels, currency adornments, earnings and schedule controls together.
 * Do not override Dokan's site-wide palette or unrelated [hidden] elements.
 */
[data-rmfw-native-hidden="1"] {
    display: none !important;
}
.rmfw-editor[data-rmfw-context="dokan"] {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 14px 0;
}
.rmfw-editor-conflict {
    padding: 12px 16px;
    border-left: 4px solid #b32d2e;
    background: #fcf0f1;
    color: #1d2327;
}

/* Dokan need not inherit WordPress admin's screen-reader utility styles. */
.rmfw-editor .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Shared net-pricing confirmation in admin and Dokan editors. */
.rmfw-editor .rmfw-net-review { margin-top: 16px; padding: 16px; border: 1px solid #b6cbd3; border-radius: 6px; background: #f4f9fb; }
.rmfw-editor .rmfw-net-rate { font-size: 16px; font-weight: 600; line-height: 1.6; }
.rmfw-editor .rmfw-net-approve { display: inline-block; float: none; padding: 10px 18px; height: auto; line-height: 1.5; background: #17556b; border: 1px solid #17556b; color: #fff; border-radius: 4px; cursor: pointer; font-weight: 600; }
.rmfw-editor .rmfw-net-approve:disabled { opacity: .5; cursor: not-allowed; }
.rmfw-editor .rmfw-net-approve:focus-visible { outline: 3px solid #d79822; outline-offset: 3px; }

/* v0.2.1: prominent per-pound preview and confirmation in both editors. */
.rmfw-editor .rmfw-net-price-card { display: grid; gap: 6px; padding: 16px; margin: 0 0 14px; border: 1px solid #b6cbd3; border-radius: 5px; background: #fff; }
.rmfw-editor .rmfw-net-price-label { font-size: 14px; line-height: 1.5; color: #1d2327; }
.rmfw-editor .rmfw-net-price { display: block; margin: 0; padding: 0; font-size: 28px; line-height: 1.3; font-weight: 700; color: #17556b; }
.rmfw-editor .rmfw-net-price-status { font-size: 13px; line-height: 1.5; color: #50575e; }
.rmfw-editor .rmfw-net-price-card[data-rmfw-net-status="approved"] { background: #edf7f0; border: 2px solid #398553; }
.rmfw-editor [data-rmfw-net-status="approved"] .rmfw-net-price,
.rmfw-editor [data-rmfw-net-status="approved"] .rmfw-net-price-status { color: #185c32; font-weight: 700; }
.rmfw-editor [data-rmfw-net-status="error"] .rmfw-net-price-status { color: #8a2424; }
.rmfw-editor .rmfw-net-review .rmfw-net-rate { margin: 0 0 10px; padding: 0; font-size: 14px; }
.rmfw-editor .rmfw-net-actions { display: flex; flex-wrap: wrap; align-items: center; margin: 18px 0 10px; padding: 0; }
.rmfw-editor .rmfw-net-actions .rmfw-net-approve { margin: 0; }
.rmfw-editor [data-rmfw-net-state] { font-size: 14px; line-height: 1.6; }
.rmfw-order-summary { margin: 20px 0; border: 1px solid #d5dadd; border-radius: 6px; overflow: hidden; background: #fff; }
.rmfw-order-summary .dokan-panel-heading { padding: 14px 18px; background: #f4f6f7; color: #194b5c; }
.rmfw-order-summary .dokan-panel-body { padding: 16px 18px; }
.rmfw-order-summary table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.rmfw-order-summary th, .rmfw-order-summary td { padding: 10px 8px; border-bottom: 1px solid #e5e8ea; vertical-align: top; }
.rmfw-order-summary th { text-align: left; font-weight: 500; }
.rmfw-order-summary td { text-align: right; white-space: nowrap; font-weight: 700; color: #194b5c; }
.rmfw-order-summary tr:last-child { background: #eef5f7; }
.rmfw-order-summary a { text-decoration: underline; text-underline-offset: 3px; }
.rmfw-order-summary p { line-height: 1.6; }
@media (max-width: 480px) { .rmfw-order-summary .dokan-panel-body { padding: 12px; } .rmfw-order-summary th, .rmfw-order-summary td { padding: 9px 5px; font-size: 14px; } }
