#app-projects .product-form-personalization-open {
    height: 38px;
    border-color: #dfe3ec;
    background: #fff;
    color: #283557;
    box-shadow: none !important;
}

#app-projects .product-form-personalization-open:hover {
    border-color: #ff5b72;
    color: #ff5b72;
}

#app-projects .product-form-personalization-open .icon {
    margin-right: 5px;
}

#app-projects .product-personalization-hidden,
#app-projects .product-feature-disabled {
    display: none !important;
}

#app-projects:not(.product-feature-access-ready) .fn_pos_price_area,
#app-projects:not(.product-feature-access-ready) .fn_hide_point_area {
    display: none !important;
}

#app-projects .fn_pos_price_area .product-required-mark {
    display: none !important;
}

#app-projects .syn_item_data.is-preferred-sync-scope {
    color: #ff536d !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#app-projects .product-sync-scope-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 4px;
    vertical-align: middle;
}

#app-projects .product-sync-scope-actions::before {
    content: "(";
}

#app-projects .product-sync-scope-actions::after {
    content: ")";
}

#app-projects .product-sync-scope-actions.is-hidden {
    display: none;
}

#app-projects .product-sync-scope-separator {
    color: #34405f;
}

#app-projects .product-sync-status-badge {
    align-items: center;
    display: none;
    min-height: 22px;
    margin-left: 9px;
    padding: 2px 9px;
    border: 1px solid #bfd9ff;
    border-radius: 999px;
    background: #eef6ff;
    color: #2474d8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}

#app-projects .product-sync-status-badge.is-active {
    display: inline-flex;
}

#app-projects .syn_item_data.button .product-sync-status-badge--action {
    margin: 0 0 0 8px;
    border-color: rgba(36, 116, 216, 0.32);
    background: #fff;
}

#app-projects .syn_item_data.button.is-global-sync-badge-only {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: default;
    pointer-events: none;
}

#app-projects .syn_item_data.button.is-global-sync-badge-only > i,
#app-projects .syn_item_data.button.is-global-sync-badge-only > .clang_text:not(.product-sync-status-badge) {
    display: none !important;
}

#app-projects .syn_item_data.button.is-global-sync-badge-only .product-sync-status-badge--action {
    margin: 0;
    background: #eef6ff;
}

#app-projects .product-subitem-list .subitem-sale-status-wrap {
    line-height: 1;
    margin-top: 3px;
}

/*
 * The language tabs beside the product-content heading use a full-width
 * positioned layer on mobile. Keep the AI action above that transparent
 * part of the tab layer and provide a practical touch target.
 */
@media (max-width: 767px) {
    #app-projects .product-content-ai-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        margin: -8px 0;
        padding: 8px 4px;
        position: relative;
        z-index: 5 !important;
        cursor: pointer;
        pointer-events: auto !important;
        touch-action: manipulation;
    }

    #app-projects .product-content-heading {
        position: relative;
        z-index: 5;
    }
}

#app-projects .product-subitem-mobile-count {
    display: none;
}

/*
 * Product money controls
 *
 * Keep the prefix and amount as one 38px control. The product pages have a
 * broad mobile rule that makes every button full-width; without this scoped
 * reset the static currency button grows over the amount input.
 */
:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .field.has-addons:has(> .control.fixed_amount_input:first-child) {
    align-items: stretch !important;
    gap: 0 !important;
    width: 100%;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .field.has-addons
    > .control.fixed_amount_input:first-child {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .field.has-addons
    > .control.fixed_amount_input:first-child
    > .button.is-static {
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #dbdbdb !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: none !important;
    font-size: 70% !important;
    line-height: 1 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .field.has-addons
    > .control.fixed_amount_input:first-child
    + .control.is-expanded {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 38px !important;
    margin: 0 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .field.has-addons
    > .control.fixed_amount_input:first-child
    + .control.is-expanded
    > .input {
    box-sizing: border-box;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    box-shadow: none !important;
}

body.is-dark
    :is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .field.has-addons
    > .control.fixed_amount_input:first-child
    > .button.is-static {
    border-color: #41485a !important;
    background: #2b3040 !important;
    color: #b9c1d0 !important;
}

/* POS custom prices place the price mode before the currency control. */
:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .warehouse-pos-table
    .control.fixed_amount_input {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .warehouse-pos-table
    .control.fixed_amount_input
    > .button.is-static {
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #dbdbdb !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: none !important;
    font-size: 70% !important;
    line-height: 1 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .warehouse-pos-table
    .control.fixed_amount_input
    + .control.is-expanded {
    min-width: 0 !important;
    height: 38px !important;
    margin: 0 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .warehouse-pos-table
    .control.fixed_amount_input
    + .control.is-expanded
    > .input {
    box-sizing: border-box;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    box-shadow: none !important;
}

body.is-dark
    :is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .warehouse-pos-table
    .control.fixed_amount_input
    > .button.is-static {
    border-color: #41485a !important;
    background: #2b3040 !important;
    color: #b9c1d0 !important;
}

:is(#app-projects.product-create-page, #app-projects.product-edit-page)
    .warehouse-pos-specific-label-mobile {
    display: none;
}

@media (min-width: 768px) {
    #app-projects.product-create-page #tab_6 .remark-title-heading,
    #app-projects.product-edit-page #tab_6 .remark-title-heading {
        transform: translateY(-12px);
    }

    #app-projects .product-subitem-list > li .recent-user {
        position: relative;
        padding-right: 58px;
    }

    #app-projects .product-subitem-list > li .recipient-meta {
        flex: 1 1 auto;
        min-width: 0;
    }

    #app-projects .product-subitem-list .subitem-sale-status-wrap {
        align-items: center;
        display: flex;
        line-height: 1;
        margin: 0 !important;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
}

#product_form_personalization_modal {
    z-index: 2147483000 !important;
}

#product_form_personalization_modal .modal-card {
    width: min(920px, calc(100vw - 32px));
    max-height: min(86vh, 880px);
    border-radius: 18px;
    overflow: hidden;
}

#product_form_personalization_modal .modal-card-head,
#product_form_personalization_modal .modal-card-foot {
    background: #fff;
}

#product_form_personalization_modal .modal-card-head {
    min-height: 72px;
    padding: 18px 24px;
    border-bottom: 1px solid #e6e9f0;
}

#product_form_personalization_modal .modal-card-title {
    color: #283557;
    font-size: 20px;
    font-weight: 700;
}

#product_form_personalization_modal .modal-card-body {
    padding: 22px 24px 26px;
    background: #f7f9fc;
}

#product_form_personalization_modal .product-personalization-intro {
    margin: 0 0 18px;
    color: #6f7890;
    font-size: 14px;
    line-height: 1.6;
}

#product_form_personalization_modal .product-personalization-master-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #dce4f1;
    border-radius: 12px;
    background: #fff;
}

#product_form_personalization_modal .product-personalization-master-control > label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #283557;
    font-weight: 700;
    cursor: pointer;
}

#product_form_personalization_modal .product-personalization-master-control input,
#product_form_personalization_modal .product-personalization-field-option input {
    accent-color: #ff536d;
}

#product_form_personalization_modal .product-personalization-master-control input {
    width: 20px;
    height: 20px;
    margin: 0;
}

#product_form_personalization_modal .product-personalization-section {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #e1e6ef;
    border-radius: 14px;
    background: #fff;
}

#product_form_personalization_modal .product-personalization-section:last-child {
    margin-bottom: 0;
}

#product_form_personalization_modal #product_form_personalization_sync {
    margin-top: 18px;
}

#product_form_personalization_modal .product-personalization-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

#product_form_personalization_modal .product-personalization-section-head .product-personalization-section-help {
    margin-bottom: 0;
}

#product_form_personalization_modal .product-personalization-section-head > div {
    min-width: 0;
}

#product_form_personalization_modal .product-personalization-section-toggle-wrap {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 6px;
    min-height: 28px;
    padding: 3px 8px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: #52617c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

#product_form_personalization_modal .product-personalization-section-toggle-wrap:hover {
    border-color: #ff8da0;
    color: #ff536d;
}

#product_form_personalization_modal .product-personalization-section-toggle {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #ff536d;
}

#product_form_personalization_modal .product-personalization-bulk-actions {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 7px;
}

#product_form_personalization_modal .product-personalization-bulk-actions .button {
    min-height: 30px;
    height: 30px;
    padding: 0 11px;
    border-color: #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: #52617c;
    box-shadow: none !important;
    font-size: 12px;
}

#product_form_personalization_modal .product-personalization-bulk-actions .button:hover {
    border-color: #ff8da0;
    color: #ff536d;
}

#product_form_personalization_modal .product-personalization-bulk-actions .button:disabled {
    opacity: 0.42;
}

#product_form_personalization_modal .product-personalization-section-title {
    margin: 0 0 4px;
    color: #283557;
    font-size: 16px;
    font-weight: 700;
}

#product_form_personalization_modal .product-personalization-section-help {
    margin: 0 0 14px;
    color: #8991a6;
    font-size: 13px;
}

#product_form_personalization_modal .product-personalization-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

#product_form_personalization_modal .product-personalization-field-option {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #e2e6ed;
    border-radius: 10px;
    color: #34405f;
    cursor: pointer;
    background: #fff;
}

#product_form_personalization_modal .product-personalization-field-option:hover {
    border-color: #ff9aab;
}

#product_form_personalization_modal .product-personalization-field-option input {
    width: 18px;
    height: 18px;
    margin: 0 9px 0 0;
    accent-color: #ff536d;
}

#product_form_personalization_modal .product-personalization-field-option.is-unavailable {
    display: none;
}

#product_form_personalization_modal .product-personalization-sync-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#product_form_personalization_modal .product-personalization-sync-item label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: #34405f;
    font-size: 13px;
    font-weight: 600;
}

#product_form_personalization_modal .product-personalization-zone-count {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 1px 7px;
    border: 1px solid #bfd9ff;
    border-radius: 999px;
    background: #eef6ff;
    color: #2474d8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

#product_form_personalization_modal .product-personalization-sync-help {
    display: block;
    margin: -1px 0 6px;
    color: #8991a6;
    font-size: 11px;
    line-height: 1.35;
}

#product_form_personalization_modal .product-personalization-sync-help--inline {
    display: inline;
    margin: 0;
    color: #8991a6;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
}

#product_form_personalization_modal .product-personalization-sync-help--below {
    margin: 5px 0 0;
}

#product_form_personalization_modal .product-personalization-sync-item select {
    width: 100%;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 36px 0 12px;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background-color: #fff;
    color: #363636;
}

#product_form_personalization_modal .modal-card-foot {
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid #e6e9f0;
}

#product_form_personalization_modal .product-personalization-save {
    min-width: 132px;
    box-shadow: none !important;
}

@media (min-width: 768px) {
    #app-projects .product-addon-title-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 20px;
    }

    #app-projects .product-addon-title-grid > .remark-title-fieldset {
        min-width: 0;
        margin: 0;
    }
}

@media (max-width: 767px) {
    :is(#app-projects.product-create-page, #app-projects.product-edit-page)
        > .page-content-wrapper {
        margin-top: 33px !important;
    }

    :is(#app-projects.product-create-page, #app-projects.product-edit-page)
        .page-content-inner {
        margin-top: 0 !important;
    }

    :is(#app-projects.product-create-page, #app-projects.product-edit-page) .form-head.is-stuck {
        position: relative !important;
        inset: auto !important;
        width: auto !important;
        margin-left: 0 !important;
        z-index: auto !important;
    }

    :is(#app-projects.product-create-page, #app-projects.product-edit-page)
        .form-head.is-stuck
        .form-head-inner {
        max-width: none !important;
        margin: 0 !important;
    }

    :is(#app-projects.product-create-page, #app-projects.product-edit-page)
        .warehouse-pos-table
        td:nth-child(2)
        .field.has-addons {
        grid-template-columns: 38px minmax(0, 1fr) !important;
    }

    html.product-personalization-modal-open,
    body.product-personalization-modal-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    body.product-personalization-modal-open .item-add-mobile-actions,
    body.product-personalization-modal-open .item-edit-mobile-actions {
        display: none !important;
    }

    #app-projects.product-edit-page .form-head-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center !important;
        gap: 10px;
    }

    #app-projects.product-edit-page .form-head .right {
        min-width: 0;
        flex: none;
    }

    #app-projects.product-edit-page .form-head .buttons {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin: 0 !important;
    }

    #app-projects.product-edit-page .form-head .buttons > .button {
        margin: 0 !important;
    }

    #app-projects.product-edit-page #store_item_save {
        width: auto !important;
        min-width: 108px;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 16px !important;
        white-space: nowrap;
    }

    #app-projects .product-subitem-mobile-count {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-width: 28px;
        min-height: 20px;
        margin-left: 6px;
        padding: 1px 6px;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.2);
        color: inherit;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        vertical-align: middle;
        white-space: nowrap;
    }

    #app-projects .product-form-personalization-open {
        width: 38px;
        min-width: 38px;
        padding: 0;
    }

    #app-projects .product-form-personalization-open .product-personalization-button-text {
        display: none;
    }

    #app-projects .product-form-personalization-open .icon {
        margin: 0 !important;
    }

    #product_form_personalization_modal {
        align-items: stretch !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding: 0 !important;
        overflow: hidden !important;
        z-index: 2147483000 !important;
    }

    #product_form_personalization_modal .modal-background {
        display: none !important;
    }

    #product_form_personalization_modal .modal-card {
        display: flex;
        flex-direction: column;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    #product_form_personalization_modal .modal-card-head {
        flex: 0 0 auto;
        min-height: 62px;
        padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
        border-radius: 0 !important;
    }

    #product_form_personalization_modal .modal-card-body {
        flex: 1 1 auto;
        min-height: 0;
        padding: 16px;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #product_form_personalization_modal .product-personalization-master-control {
        align-items: center;
        gap: 8px;
        padding: 11px 12px;
    }

    #product_form_personalization_modal .product-personalization-section-head {
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }

    #product_form_personalization_modal .product-personalization-section-toggle-wrap {
        margin-left: auto;
    }

    #product_form_personalization_modal .product-personalization-bulk-actions {
        justify-content: flex-end;
    }

    #product_form_personalization_modal .product-personalization-section {
        padding: 14px;
    }

    #product_form_personalization_modal .product-personalization-field-grid,
    #product_form_personalization_modal .product-personalization-sync-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #product_form_personalization_modal .product-personalization-field-option {
        min-height: 42px;
        padding: 8px 9px;
        font-size: 13px;
    }

    #product_form_personalization_modal .modal-card-foot {
        position: relative;
        z-index: 2;
        flex: 0 0 auto;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        border-radius: 0 !important;
        box-shadow: 0 -6px 18px rgba(40, 50, 82, 0.08);
    }

    #product_form_personalization_modal .product-personalization-save {
        width: 100%;
    }
}

/*
 * The option editor is opened from inside the product-subitem manager.
 * Keep this second-level dialog above the manager and its overlay instead of
 * letting source order place it behind the still-open parent dialog.
 */
html body #sub_item_edit_panel.modal.is-active {
    z-index: 1015 !important;
}

html body #sub_item_edit_panel.modal {
    align-items: center;
    padding: 24px;
}

html body #sub_item_edit_panel > .modal-background {
    background: rgba(25, 31, 47, 0.52);
}

html body #sub_item_edit_panel > .modal-content {
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(24, 32, 56, 0.24);
    overflow: hidden !important;
}

html body #sub_item_edit_panel .modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
}

html body #sub_item_edit_panel .modal-card-head {
    min-height: 68px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e8ecf2;
    border-radius: 18px 18px 0 0;
}

html body #sub_item_edit_panel .modal-card-head h3 {
    margin: 0;
    color: #283252;
    font-size: 1.08rem;
    font-weight: 750;
}

html body #sub_item_edit_panel .modal-card-head .h-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #6b7280;
    background: #f7f8fb;
    border: 1px solid #e2e6ed;
    border-radius: 999px;
    cursor: pointer;
}

html body #sub_item_edit_panel .modal-card-head .h-modal-close:hover {
    color: #ff596f;
    background: #fff0f3;
    border-color: #ffc2cb;
}

html body #sub_item_edit_panel .modal-card-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 20px;
    background: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

html body #sub_item_edit_panel .inner-content,
html body #sub_item_edit_panel .modal-form {
    margin: 0;
    padding: 0;
}

html body #sub_item_edit_panel .fieldset {
    margin: 0 0 16px;
    padding: 16px !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

html body #sub_item_edit_panel .fieldset:last-child {
    margin-bottom: 0;
}

html body #sub_item_edit_panel .fieldset-heading {
    min-height: 36px;
    margin: 0;
}

html body #sub_item_edit_panel .fieldset-heading h4,
html body #sub_item_edit_panel .product-option-required-heading {
    color: #34405f;
    font-size: 0.94rem;
    font-weight: 700;
}

html body #sub_item_edit_panel .tabs-wrapper {
    margin-top: -36px !important;
}

html body #sub_item_edit_panel .tabs-inner {
    margin: 0 0 12px;
}

html body #sub_item_edit_panel .tabs {
    margin: 0;
}

html body #sub_item_edit_panel .tabs ul {
    justify-content: flex-end;
    border-bottom: 1px solid #dfe5ed;
}

html body #sub_item_edit_panel .tabs li a {
    min-width: 68px;
    padding: 8px 14px;
    color: #9aa3b5;
    border: 0;
    border-bottom: 3px solid transparent;
}

html body #sub_item_edit_panel .tabs li.is-active a {
    color: #ff596f;
    background: transparent;
    border-bottom-color: #ff596f;
}

html body #sub_item_edit_panel #title_edit_tab,
html body #sub_item_edit_panel #title_en_edit_tab {
    display: none !important;
}

html body #sub_item_edit_panel #title_edit_tab.is-active,
html body #sub_item_edit_panel #title_en_edit_tab.is-active {
    display: block !important;
}

html body #sub_item_edit_panel .input,
html body #sub_item_edit_panel .new_option_name_edit {
    min-height: 42px;
    padding: 8px 12px;
    color: #283252;
    background: #ffffff;
    border: 1px solid #dce2eb;
    border-radius: 9px;
    box-shadow: none;
}

html body #sub_item_edit_panel #new_option_html_edit {
    margin-bottom: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

html body #sub_item_edit_panel #new_option_html_edit table {
    width: 100%;
    margin: 0;
    background: #ffffff;
}

html body #sub_item_edit_panel #new_option_html_edit th,
html body #sub_item_edit_panel #new_option_html_edit td {
    padding: 8px 10px;
    vertical-align: middle;
    background: #ffffff;
    border-bottom: 1px solid #edf0f5;
}

html body #sub_item_edit_panel #new_option_html_edit tbody tr:last-child td {
    border-bottom: 0;
}

html body #sub_item_edit_panel #new_option_html_edit th:last-child,
html body #sub_item_edit_panel #new_option_html_edit td:last-child {
    width: 46px;
    text-align: center;
}

html body #sub_item_edit_panel #new_option_html_edit .new_option_name_edit {
    width: 100%;
}

html body #sub_item_edit_panel.subitem-edit-lang-cn #new_option_html_edit th:nth-child(2),
html body #sub_item_edit_panel.subitem-edit-lang-cn #new_option_html_edit td:nth-child(2),
html body #sub_item_edit_panel.subitem-edit-lang-en #new_option_html_edit th:nth-child(1),
html body #sub_item_edit_panel.subitem-edit-lang-en #new_option_html_edit td:nth-child(1) {
    display: none !important;
}

html body #sub_item_edit_panel .product-option-required-heading {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 0 0 8px;
}

html body #sub_item_edit_panel .product-required-mark {
    color: #ff596f;
    font-size: 0.82rem;
}

html body #sub_item_edit_panel .field.has-addons {
    margin: 0;
}

html body #sub_item_edit_panel .new_option_edit {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 9px !important;
}

html body #sub_item_edit_panel .modal-card-foot {
    flex: 0 0 auto;
    min-height: 68px;
    padding: 12px 20px;
    background: #ffffff;
    border-top: 1px solid #e8ecf2;
    border-radius: 0 0 18px 18px;
}

html body #sub_item_edit_panel .modal-card-foot #edit_super_option_btn {
    min-width: 136px;
    min-height: 42px;
    margin-left: auto;
    border-radius: 10px;
}

/*
 * Product add/edit mobile modal standard
 *
 * Keep every dialog above the fixed mobile navigation and the fixed
 * add/edit action bar. The layout mirrors the personalization dialog:
 * full viewport, square corners, fixed head/foot and a scrolling body.
 */
@media (max-width: 767px) {
    html body .modal.h-modal {
        align-items: stretch !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding: 0 !important;
        overflow: hidden !important;
        z-index: 2147483000 !important;
    }

    html body #sub_item_edit_panel.modal.h-modal.is-active {
        z-index: 2147483100 !important;
    }

    html body .modal.h-modal > .modal-background {
        display: none !important;
    }

    html body .modal.h-modal > .modal-content {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    html body .modal.h-modal > .modal-content > .modal-card,
    html body .modal.h-modal > .modal-card {
        display: flex !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    html body .modal.h-modal .modal-card-head {
        flex: 0 0 auto !important;
        min-height: 62px !important;
        padding: calc(14px + env(safe-area-inset-top)) 18px 14px !important;
        border-radius: 0 !important;
    }

    html body .modal.h-modal .modal-card-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        padding: 16px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    html body .modal.h-modal .modal-card-foot {
        position: relative !important;
        z-index: 2 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
        border-radius: 0 !important;
        box-shadow: 0 -6px 18px rgba(40, 50, 82, 0.08);
    }

    html body .modal.h-modal .modal-card-foot .button {
        min-height: 38px !important;
    }

    html body #sub_item_add_panel.product-subitem-modal {
        align-items: stretch !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 0 !important;
        overflow: hidden !important;
        z-index: 2147483000 !important;
    }

    html body #sub_item_add_panel.product-subitem-modal .panel-overlay {
        display: none !important;
    }

    html body #sub_item_add_panel.product-subitem-modal .right-panel {
        display: flex !important;
        flex-direction: column !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    html body #sub_item_add_panel.product-subitem-modal .right-panel-head {
        flex: 0 0 auto !important;
        min-height: 62px !important;
        padding: calc(14px + env(safe-area-inset-top)) 16px 14px !important;
        border-radius: 0 !important;
    }

    html body #sub_item_add_panel.product-subitem-modal .right-panel > div:not(.right-panel-head) {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    html body .product-subitem-picker-modal,
    html body .mobile-stock-adjust-modal {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 0 !important;
        overflow: hidden !important;
        z-index: 2147483000 !important;
    }

    html body .product-subitem-picker-backdrop,
    html body .mobile-stock-adjust-backdrop {
        display: none !important;
    }

    html body .product-subitem-picker-sheet,
    html body .mobile-stock-adjust-sheet {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        z-index: 2147483001 !important;
    }

    html body .product-subitem-picker-head,
    html body .mobile-stock-adjust-head {
        flex: 0 0 auto !important;
        min-height: 62px !important;
        padding: calc(14px + env(safe-area-inset-top)) 16px 14px !important;
        border-radius: 0 !important;
    }

    html body .product-subitem-mobile-picker-list,
    html body .mobile-stock-adjust-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /*
     * These action bars live outside several legacy modal nodes. Hiding
     * them while any dialog is open prevents them from intercepting taps
     * near the modal footer on mobile Safari.
     */
    body:has(.modal.is-active) .item-add-mobile-actions,
    body:has(.modal.is-active) .item-edit-mobile-actions,
    body:has(#sub_item_add_panel.is-active) .item-add-mobile-actions,
    body:has(#sub_item_add_panel.is-active) .item-edit-mobile-actions,
    body:has(.product-subitem-picker-modal.is-active) .item-add-mobile-actions,
    body:has(.product-subitem-picker-modal.is-active) .item-edit-mobile-actions,
    body:has(.mobile-stock-adjust-modal.is-active) .item-edit-mobile-actions {
        display: none !important;
    }
}
