﻿.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, .22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
    z-index: var(--z-settings-overlay)
}

.settings-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto
}

.setting,
.setting * {
    box-sizing: border-box
}

.setting,
.setting button,
.setting input,
.setting textarea {
    font-family: "Cairo", "Inter", sans-serif
}

.setting {
    --primary: var(--color-accent, var(--color-primary));
    --white: var(--color-surface, #fff);
    --text: var(--color-text, #111827);
    --muted: var(--color-text-muted, #7b8190);
    --border: var(--color-border, #e8ebf3);
    --soft: rgba(var(--color-primary-rgb),0.09);
    --settings-action-clearance: 116px;
    position: sticky;
    top: calc(var(--header-height) + var(--content-gutter));
    align-self: start;
    width: min(100%, var(--settings-width));
    height: calc(100vh - var(--header-height) - (var(--content-gutter) * 2));
    max-height: calc(100vh - var(--header-height) - (var(--content-gutter) * 2));
    background: var(--color-surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
    direction: rtl;
    color: var(--text)
}

.setting img {
    width: 100%;
    display: block
}

.top-title-setting {
    padding: 20px 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    gap: 14px
}

.top-title-setting__main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding-top: 6px
}

.line-openning {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    height: 4px;
    width: 44px;
    background: var(--color-border);
    border-radius: 999px
}

.top-title-setting h4 {
    margin: 0;
    font-size: 15px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em
}

.top-title-setting h4 span {
    color: var(--primary)
}

.steps {
    background: rgba(var(--color-primary-rgb),0.09);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap
}

.close-settings {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer
}

.settings-panel-shell {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.conatiner-setting-steps {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 26px 0;
    padding-bottom: max(10vh, var(--settings-action-clearance))
}

.settings-panel-action {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 14px 16px 16px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    pointer-events: none
}

.settings-panel-action .shared-generate-btn {
    width: 100%;
    justify-content: center;
    pointer-events: auto;
}

.section-choiseing {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 6px
}

.section-choiseing:last-child {
    border-bottom: 0
}

.section-choiseing h5,
.section-title,
.s8-title {
    margin: 0;
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: -0.01em
}

.section-choiseing p,
.section-description,
.s8-desc,
.extraInfoHelper,
.upload_box_text p,
.box-camera-gallery p,
.mini-choice-note,
.aspect-card span,
.brand-logo-preview-meta span {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5
}

.step-number,
.s8-step {
    min-width: 18px;
    height: 18px;
    background: rgba(var(--color-primary-rgb),0.1);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700
}

.section-head-inline,
.s8-title-row,
.manualColorHead,
.manualColorInfo,
.colorPickerTop,
.brand-logo-preview-card,
.offerSavedCard,
.extraInfoFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.section-badge-new,
.section-badge-soft,
.s8-badge,
.mini-choice-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap
}

.section-badge-new,
.mini-choice-badge {
    background: var(--primary);
    color: var(--white)
}

.section-badge-soft,
.s8-badge {
    background: rgba(var(--color-primary-rgb),0.09);
    color: var(--color-accent)
}

.setting-status-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(var(--color-primary-rgb),.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600
}

.setting-status-message[data-state="error"] {
    background: var(--color-danger-soft);
    color: var(--color-danger)
}

.setting-status-message[data-state="loading"] {
    background: rgba(var(--color-primary-rgb),.1)
}

.upload_box {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 2px dashed var(--color-accent);
    border-radius: 14px;
    background: rgba(var(--color-primary-rgb),0.09);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: .25s ease;
    margin-top: 8px;
    text-align: center;
    gap: 8px
}

.upload_box:hover {
    background: linear-gradient(to right, rgba(var(--color-primary-rgb),0.09), rgba(var(--color-primary-rgb),0.14))
}

.upload_box.dragover {
    background: linear-gradient(to right, rgba(var(--color-primary-rgb),0.09), rgba(var(--color-primary-rgb),0.14));
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb),.08)
}

.upload_box .upload_box_icon {
    width: 74px;
    margin: auto;
    color: var(--primary)
}

.upload_box_text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    margin-top: 8px
}

.upload_box_text strong {
    font-size: 17px;
    color: var(--color-text)
}

#uploadedFileName,
#brandLogoFileName {
    min-height: 20px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600
}

.output {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
    display: flex;
    direction: ltr;
    gap: 0;
    margin-top: 10px;
    position: relative;
    background: var(--color-surface)
}

.output .output_live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(var(--color-primary-rgb), 0.1);
    border: 1px solid rgba(var(--color-primary-rgb), 0.18);
    white-space: nowrap;
    flex-shrink: 0
}

.output .product_img {
    width: 64px;
    min-width: 64px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-subtle)
}

.output .product_img img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    aspect-ratio: 1/1;
    object-fit: cover
}

.output .contain_content_default {
    padding: 10px 12px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-left: 1px solid var(--color-border)
}

.output-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

.output .name_product {
    text-transform: capitalize;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.output .contain_section-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center
}

.sections_features_defaults {
    background: rgba(var(--color-primary-rgb), 0.09);
    color: var(--primary);
    border: 1px solid rgba(var(--color-primary-rgb), 0.18);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap
}

.button_choise_features {
    width: 100%;
    min-height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    transition: .25s ease;
    position: relative;
    margin-top: 6px;
    gap: 10px;
    font-size: 13px
}

.button_choise_features:hover {
    border-color: rgba(var(--color-primary-rgb),0.3);
    background: rgba(var(--color-primary-rgb),0.03)
}

.button_choise_features .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: right
}

.button_choise_features .svg_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.box_data {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    z-index: 30;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08)
}

.button_choise_features.open .box_data {
    display: block
}

.box_searching {
    width: 100%;
    height: 44px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding: 0 10px
}

.box_searching .icon_search {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center
}

.box_searching input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--text);
    text-align: right
}

.box_data_group {
    padding: 8px;
    max-height: 250px;
    overflow-y: auto
}

.data_here {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 12px;
    transition: .25s ease;
    color: var(--color-text);
    font-size: 14px;
    background: transparent;
    border: 0;
    text-align: right;
    cursor: pointer
}

.data_here:hover,
.data_here.active_data_hare {
    background: rgba(var(--color-primary-rgb),0.09)
}

.data_here .icon_checked {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.data_here .icon_checked svg {
    display: none
}

.data_here.active_data_hare .icon_checked svg {
    display: block
}

.box-popup {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, .22);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
    z-index: 40;
    border-radius: inherit
}

.box-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto
}

.box-camera-gallery {
    width: 100%;
    max-width: 100%;
    background: var(--white);
    border-radius: 28px 28px 0 0;
    padding: 0 20px 24px;
    transform: translateY(100%);
    transition: transform .42s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .08);
    max-height: calc(100% - 12px);
    overflow-y: auto;
    overscroll-behavior: contain
}

.box-camera-gallery.active-box-choising {
    transform: translateY(0)
}

.box-camera-gallery.closing-box-choising {
    transform: translateY(100%)
}

.box-camera-gallery .top-line {
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center
}

.box-camera-gallery .line-drag-drop {
    height: 5px;
    width: 54px;
    background: var(--color-border);
    border-radius: 999px
}

.box-camera-gallery h5 {
    font-size: 16px;
    color: var(--text);
    margin: 0 0 8px
}

.box-camera-gallery p {
    margin: 0 0 16px
}

.box_parent {
    display: grid;
    gap: 14px
}

.boxes-choising {
    border: 1px solid var(--color-border);
    background: transparent;
    border-radius: 14px;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: .25s ease;
    width: 100%;
    text-align: right
}

.boxes-choising:hover {
    background: var(--color-surface-subtle)
}

.boxes-choising .left_icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    padding: 10px;
    background: var(--color-surface-subtle);
    border-radius: 50%
}

.boxes-choising .right_content {
    display: flex;
    flex-direction: column;
    text-align: right
}

.boxes-choising .right_content strong {
    font-size: 15px;
    color: var(--color-text-soft)
}

.boxes-choising .right_content span {
    font-size: 13px;
    color: var(--muted)
}

.upload_drag_overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .25s ease;
    z-index: 5
}

.drag_overlay_content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--color-accent)
}

.drag_overlay_content strong {
    font-size: 20px;
    color: var(--color-accent)
}

.drag_overlay_content p {
    font-size: 14px;
    color: var(--color-accent-hover)
}

.drag_overlay_icons {
    position: relative;
    width: 88px;
    height: 68px
}

.drag_icon {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(var(--color-primary-rgb),.1);
    border: 1px solid rgba(var(--color-primary-rgb),.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    box-shadow: 0 8px 25px rgba(var(--color-primary-rgb),.12)
}

.drag_icon svg {
    width: 26px;
    height: 26px
}

.drag_icon_back {
    left: 0;
    top: 8px;
    transform: rotate(-8deg)
}

.drag_icon_front {
    right: 0;
    top: 0;
    transform: rotate(8deg)
}

.upload_box.dragover .upload_drag_overlay {
    opacity: 1;
    visibility: visible
}

.upload_box.dragover .upload_box_icon,
.upload_box.dragover .upload_box_text {
    opacity: .12;
    transform: scale(.98);
    transition: .25s ease
}

.brand-mode-switch {
    margin-top: 8px;
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 3px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px
}

.brand-mode-btn {
    border: 0;
    background: transparent;
    min-height: 34px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    transition: .25s ease;
    font-family: inherit
}

.brand-mode-btn.active,
.brand-mode-btn[aria-pressed="true"] {
    background: var(--color-surface);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08)
}

.brand-fields[hidden],
.brand-logo-preview-wrap[hidden] {
    display: none !important
}

.brand-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px
}

.brand-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.brand-label,
.extraInfoLabel,
.manualColorLabel {
    font-size: 14px;
    font-weight: 700;
    color: var(--text)
}

.brand-input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    padding: 0 12px;
    outline: none;
    font-size: 13px;
    color: var(--text);
    transition: .25s ease;
    text-align: right
}

.brand-input::placeholder {
    color: var(--color-text-faint)
}

.brand-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.1)
}

.brand-upload-box {
    width: 100%;
    min-height: 88px;
    margin-top: 0;
    background: rgba(var(--color-primary-rgb),0.04);
    border-radius: 12px;
    align-items: center;
    gap: 8px;
    padding: 16px;
    text-align: center;
    border-color: rgba(var(--color-primary-rgb),0.2)
}

.brand-upload-box .upload_box_text {
    margin-top: 0
}

.brand-upload-box .upload_box_icon {
    margin: 0 auto
}

.brand-logo-preview-wrap {
    margin-top: 10px
}

.brand-logo-preview-card {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface)
}

.brand-logo-preview-image {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    background: rgba(var(--color-primary-rgb),0.06);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.brand-logo-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.brand-logo-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    text-align: right
}

.brand-logo-preview-meta strong {
    font-size: 14px;
    color: var(--text)
}

.compact-choice-section {
    gap: 10px
}

.mini-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px
}

.quality-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.mini-choice-card {
    position: relative;
    min-height: 52px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    cursor: pointer;
    transition: .22s ease;
    color: var(--text)
}

.mini-choice-card:hover {
    border-color: rgba(var(--color-primary-rgb),0.25);
    background: rgba(var(--color-primary-rgb),0.03)
}

.mini-choice-card.active {
    background: var(--primary);
    border-color: transparent;
    color: #fff
}

.mini-choice-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1
}

.mini-choice-sub {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.2
}

.mini-choice-card.active .mini-choice-sub {
    color: rgba(255, 255, 255, .75)
}

.mini-choice-badge {
    position: absolute;
    top: -8px;
    left: 0;
    padding: 5px 7px;
    font-size: 10px
}

.mini-choice-note {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px
}

.note-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--primary)
}

.aspect-ratio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px
}

.aspect-card {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 10px;
    min-height: 120px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: .22s ease;
    text-align: center;
    color: var(--text)
}

.aspect-card:hover {
    border-color: rgba(var(--color-primary-rgb),0.25);
    background: rgba(var(--color-primary-rgb),0.03)
}

.aspect-card.active {
    border-color: var(--primary);
    background: rgba(var(--color-primary-rgb),0.05)
}

.aspect-preview {
    border: 2px solid var(--color-border);
    border-radius: 10px;
    transition: .22s ease
}

.aspect-card.active .aspect-preview {
    border-color: var(--primary)
}

.aspect-preview.portrait {
    width: 30px;
    height: 58px
}

.aspect-preview.landscape {
    width: 58px;
    height: 30px
}

.aspect-preview.square {
    width: 40px;
    height: 40px;
    border-radius: 12px
}

.aspect-card strong {
    font-size: 16px;
    line-height: 1;
    color: var(--text)
}

.aspect-card.active strong {
    color: var(--primary)
}

.aspect-card.active span {
    color: rgba(var(--color-primary-rgb),0.75)
}

.s8-header {
    margin-bottom: 12px
}

.s8-title {
    font-size: 15px
}

.s8-badge {
    padding: 5px 9px
}

.s8-desc {
    font-size: 13px
}

.s8-toggle-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    margin-bottom: 12px;
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 3px
}

.s8-toggle-btn,
.toggle-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 6px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
    font-family: inherit
}

.s8-toggle-btn.active,
#section-12-wrapper .toggle-btn.active,
#section-13-wrapper .toggle-btn.active,
#section-14-wrapper .toggle-btn.active {
    background: var(--color-surface);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08)
}

.s8-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s ease
}

.s8-content-wrapper.active {
    grid-template-rows: 1fr
}

.s8-content-inner {
    overflow: hidden;
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0 14px;
    opacity: 0;
    transition: opacity .25s ease, padding .25s ease;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.s8-content-wrapper.active .s8-content-inner {
    opacity: 1;
    padding: 14px
}

.s8-input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
}

.s8-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.s8-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary)
}

.s8-input-group input,
.offerInput,
.extraInfoTextarea,
.manualColorHex,
.pickerHexValue {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--color-text);
    outline: none;
    transition: border-color .2s ease;
    font-family: inherit;
    background: var(--color-surface);
    text-align: right
}

.s8-input-group input {
    height: 38px;
    border: 1px solid var(--color-border)
}

.s8-input-group input:focus,
.offerInput:focus,
.extraInfoTextarea:focus,
.manualColorHex:focus,
.pickerHexValue:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.1)
}

.s8-save-btn,
.offerSaveBtn,
.saveColorBtn,
.applyColorBtn {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .2s ease
}

.s8-save-btn:hover,
.offerSaveBtn:hover,
.saveColorBtn:hover,
.applyColorBtn:hover {
    background: var(--color-accent-hover)
}

.offerSaveBtn,
.saveColorBtn,
.applyColorBtn {
    width: auto;
    height: 36px;
    padding: 0 16px;
    font-weight: 500
}

.d-none {
    display: none !important
}

#section-12-wrapper .offerToggleGrid,
#section-13-wrapper .extraInfoToggleGrid,
#section-14-wrapper .colorModeGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background-color: var(--color-surface-subtle);
    padding: 3px;
    border-radius: 8px;
    gap: 3px;
    margin-bottom: 14px;
    border: 1px solid var(--color-border)
}

.offerSectionBody,
.extraInfoWrap,
.manualColorWrap {
    background-color: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 14px;
    animation: fadeIn .2s ease-in-out
}

.offerAddBtn {
    width: 100%;
    border: 1px dashed rgba(var(--color-primary-rgb),0.3);
    background-color: transparent;
    color: var(--primary);
    padding: 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: .2s ease
}

.offerAddBtn:hover {
    background: rgba(var(--color-primary-rgb),0.05)
}

.offerEditor {
    display: flex;
    gap: 8px;
    align-items: center
}

.offerSavedWrap {
    width: 100%
}

.offerSavedCard {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px
}

.offerSavedText {
    font-size: 13px;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    text-align: right
}

.offerEditBtn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px
}

.extraInfoTextarea {
    resize: vertical;
    min-height: 60px;
    max-height: 150px
}

.extraInfoFooter {
    margin-top: 8px
}

.extraInfoCount {
    font-size: 11px;
    color: var(--color-text-faint);
    font-weight: 500
}

.manualColorHead {
    margin-bottom: 12px
}

.manualColorInfo {
    justify-content: flex-start
}

.selectedColorPreview,
.pickerLivePreview {
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-accent);
    flex-shrink: 0
}

.openColorPickerBtn,
.closeColorPickerBtn {
    border: 1px solid var(--color-border);
    background-color: var(--color-surface-2);
    color: var(--color-text);
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer
}

.manualColorActions,
.colorPickerLive {
    display: flex;
    gap: 8px;
    align-items: center
}

.savedColorNote {
    margin-top: 10px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500
}

.colorPickerOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999
}

.colorPickerPanel {
    width: 100%;
    max-width: 360px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 14px
}

.colorPickerTop {
    margin-bottom: 12px
}

.colorPickerTop strong {
    font-size: 14px;
    color: var(--color-text)
}

.closeColorPickerBtn {
    width: 34px;
    padding: 0;
    font-size: 18px
}

.colorFieldWrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px
}

.hueRange,
.lightnessRange {
    width: 100%;
    accent-color: var(--primary)
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@media (max-width:640px) {
    .setting {
        border-radius: 0;
        width: 100%;
        max-height: none
    }

    .top-title-setting {
        padding: 22px 16px 12px
    }

    .top-title-setting__main {
        gap: 10px
    }

    .section-choiseing {
        padding: 14px
    }

    .box-camera-gallery {
        width: 100%;
        border-radius: 26px 26px 0 0
    }

    .mini-choice-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .quality-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .mini-choice-card {
        min-height: 48px;
        padding: 8px 4px
    }

    .mini-choice-title {
        font-size: 12px
    }

    .mini-choice-sub {
        font-size: 10px
    }

    .aspect-ratio-grid {
        gap: 8px
    }

    .aspect-card {
        min-height: 108px;
        padding: 10px 6px;
        border-radius: 10px
    }

    .aspect-card strong {
        font-size: 15px
    }

    .aspect-card span {
        font-size: 11px
    }

    .aspect-preview.portrait {
        width: 24px;
        height: 50px
    }

    .aspect-preview.landscape {
        width: 50px;
        height: 24px
    }

    .aspect-preview.square {
        width: 36px;
        height: 36px
    }

    .s8-input-row {
        grid-template-columns: 1fr
    }

    .manualColorActions,
    .offerEditor {
        flex-direction: column;
        align-items: stretch
    }

    .openColorPickerBtn,
    .saveColorBtn,
    .applyColorBtn,
    .offerSaveBtn {
        width: 100%
    }
}

.settings-fab {
    display: none;
}