.pop-up-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 10;
}

.pop-up-container.show {
    display: flex
}

.pop-up-container .bg {
    width: 100%;
    height: 100%;
    background: var(--color-bg-page);
    opacity: 0.5;
}

.pop-up {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 95vh;
    background: var(--color-bg-page);
    border: 1px solid var(--color-border-popup);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pop-up .header {
    width: 100%;
    height: 40px;
    min-height: 40px;
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    position: relative;
}

.pop-up .header h2 {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.pop-up .close-button,
.pop-up .back-button {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--color-button-secondary);
    border: 1px solid transparent;
    outline: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    position: absolute;
    right: 8px;
}
.pop-up .back-button {
    right: unset;
    left: 8px;
}

.pop-up .close-button img,
.pop-up .back-button img {
    width: 16px;
    height: 16px;
}


body.cb-light .pop-up .close-button img,
body.light .pop-up .close-button img,
body.cb-light .pop-up .back-button img,
body.light .pop-up .back-button img {
    filter: invert(1);
}

.pop-up .close-button:hover,
.pop-up .back-button:hover {
    border: 1px solid transparent;
}





#sectors-assets-pop-up .pop-up {
    width: 496px;
    height: 446px;
}

#sectors-assets-pop-up.short .pop-up {
    height: unset
}


#sectors-assets-pop-up .sectors-breaks-container {
    width: 100%;
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
}

#sectors-assets-pop-up .sectors-breaks-container p {
    font-weight: 500;
    font-size: 16px;
    line-height: 19px;
    color: var(--color-text-primary);
}

#sectors-assets-pop-up .sectors-breaks-container .checkbox-container {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-button-accent-hover);
    border-radius: 4px;
}

#sectors-assets-pop-up .sectors-breaks-container .checkbox-container img {
    display: none
}
#sectors-assets-pop-up .sectors-breaks-container.active .checkbox-container img {
    display: block
}


#sectors-assets-pop-up .sector-depth {
    width: 100%;
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
}

#sectors-assets-pop-up .sector-depth.disabled {
    display: none
}

#sectors-assets-pop-up .sector-depth p {
    font-weight: 500;
    font-size: 16px;
    line-height: 19px;

    color: var(--color-text-primary);
}

#sectors-assets-pop-up .sector-depth .input-wrapper {
    display: flex;
    gap: 4px;
}

#sectors-assets-pop-up .sector-depth input {
    width: 34px;
    height: 28px;
    text-align: center;
    border-radius: 4px;
    background: var(--color-button-secondary);
    border: none;
    outline: none;
    color: var(--color-text-primary);
    font-size: 16px;
    font-weight: 500;
}

#sectors-assets-pop-up .sector-depth .button-wrapper {
    width: 24px;
    height: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#sectors-assets-pop-up .sector-depth .button-wrapper button {
    width: 24px;
    height: 12px;
    background: var(--color-button-accent-hover);
    border: none;
    outline: none;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

body.light #sectors-assets-pop-up .sector-depth .button-wrapper button {
    background: var(--color-button-accent-hover)
}


#sectors-assets-pop-up .content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100% - 40px - 16px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 16px;
}

#sectors-assets-pop-up .content.disabled {
    display: none
}

#sectors-assets-pop-up .content .item {
    background: #FFFFFF05;
    width: 100%;
    height: 40px;
    min-height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 12px;
    cursor: pointer;
}


/*body.light #sectors-assets-pop-up .content .item {*/
/*    background: var(--color-bg-light)*/
/*}*/

#sectors-assets-pop-up .content .item .left-side {
    display: flex;
    gap: 12px;
    align-items: center;
}

#sectors-assets-pop-up .content .item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

#sectors-assets-pop-up .content .item .icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sectors-assets-pop-up .content .item p {
    font-weight: 500;
    font-size: 16px;

    color: var(--color-text-primary);
}

#sectors-assets-pop-up .content .item .checkbox-container {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-button-accent-hover);
    border-radius: 4px;
}

#sectors-assets-pop-up .content .item .checkbox-container img {
    display: none
}
#sectors-assets-pop-up .content .item.active .checkbox-container img {
    display: block
}

/*body.light #sectors-assets-pop-up .content .item .checkbox-container {*/
/*    border-radius: 4px;*/
/*    background: var(--color-accent)*/
/*}*/

/* ====== */
/* ====== */
/* ====== */

.pop-up-container .pop-up {
    width: 496px;
}

.pop-up-container .content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.pop-up-container .content .item {
    width: 100%;
    height: 52px;
    background: var(--color-button-tertiary);
    border-radius: 8px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: space-between;
    user-select: none;
}
#settings-pop-up .to-vr {
    text-decoration: none;
}
#settings-pop-up .to-vr .pseudo-button {
    color: var(--color-text-cta);
    background: var(--color-icon-toggle-active);
    width: 180px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
}

#settings-pop-up .links-container {
    display: flex;
    gap: 16px;
}
#settings-pop-up .links-container .item a {
    justify-content: center;
}

#settings-pop-up .contact-us {
    text-decoration: none;
}
#settings-pop-up .contact-us .item p {
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 16px;
}
#settings-pop-up .contact-us .item span {
    color: var(--color-text-tertiary);
    font-weight: 500;
}
#settings-pop-up .contact-us img {
    width: 20px;
    height: 20px;
}
/*body.light .pop-up-container .content .item.selected {*/
/*    background: var(--color-bg-light);*/
/*}*/

.pop-up-container .content .item p {
    font-weight: 500;
    font-size: 16px;
    line-height: 19px;
    color: var(--color-text-primary);
}

body.light .pop-up-container .content .item p {
    color: var(--color-text-primary);
}

body.light .pop-up-container .content .item:not(.selected) p {
    /*color: #1e1e1e5e;*/
}

/*body.light .pop-up-container .pop-up {*/
/*    border: 1px solid var(--color-bg-light) !important;*/
/*}*/

.pop-up-container .content .item p .subtitle {
    font-size: 14px;
    opacity: 0.5;
}

body.light .pop-up-container .content .item.selected p .subtitle {
    color: var(--color-text-primary);
}

/*body.light .pop-up-container .content .item:not(.selected) p .subtitle {*/
/*    color: #1e1e1e5e;*/
/*}*/

.pop-up-container .content .item .switcher-container {
    width: 48px;
    height: 24px;
    position: relative;
}

.pop-up-container .content .item .switcher-container .switcher-line {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 12px;
    border-radius: 4px;
    background: var(--color-button-secondary);
}

.pop-up-container .content .item .switcher-container .switcher-button {
    position: absolute;
    height: 24px;
    width: 24px;
    border-radius: 4px;
    background: var(--color-icon-toggle-inactive);
    top: 0;
    left: 0;
    transition: 400ms;
}

.pop-up-container .content .item.selected .switcher-container .switcher-button {
    background: var(--color-icon-toggle-active);
    left: calc(100% - 24px)
}

body.light .pop-up-container .content .item.selected .switcher-container .switcher-button {
    background: var(--color-icon-toggle-active);
}

.pop-up-container .content .item .variants-container {
    width: 280px;
    /* fixed container width */
    height: 40px;
    background: var(--color-button-secondary);
    border-radius: 4px;
    display: flex;
    gap: 0;
    /* no gaps between buttons */
    position: relative;
    overflow: hidden;
}

/* Sliding background animation */
.pop-up-container .content .item .variants-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: calc(100% / var(--button-count, 4));
    background: var(--color-icon-toggle-active);
    border-radius: 4px;
    transition: transform 0.4s ease;
    z-index: 1;
    transform: translateX(calc(var(--selected-index, 0) * 100%));
}

.pop-up-container .content .item .variants-container .variant {
    flex: 1;
    /* buttons automatically distribute evenly */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
    position: relative;
}

.pop-up-container .content .item .variants-container .variant:hover {
    opacity: 0.9;
}

.pop-up-container .content .item .variants-container .variant.selected {
    color: var(--color-text-cta);
}


#right-configure-pop-up .pop-up {
    width: 520px;
}


.pop-up-container .content .item.select-wide {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    height: unset;
    padding: 12px;
}

.pop-up-container .content .item.select-wide .variants-container {
    width: 100%;
}

#right-configure-pop-up .content .item.select .variants-container::before {
    width: calc(100% / 2);
}

#right-configure-pop-up .content .item.select.select-wide .variants-container::before {
    width: calc(100% / 3);
}



/* Light theme */
/*body.light .pop-up-container .content .item .variants-container .variant {*/
/*    color: var(--color-text-primary);*/
/*}*/

/*body.light .pop-up-container .content .item .variants-container .variant.selected {*/
/*    color: #fff;*/
/*}*/

/*body.light .pop-up-container .content .item .variants-container::before {*/
/*    background: var(--color-accent);*/
/*}*/

/* Deactivate all configure pop-up items except animation and theme-mode when market map is active */
body.mmap-graph #configure-pop-up .content .item:not([data-key="animation"]):not([data-key="theme-mode"]) {
    opacity: 0.65 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

body.mmap-graph #configure-pop-up .content .item:not([data-key="animation"]):not([data-key="theme-mode"]) .variants-container .variant {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

body.mmap-graph #configure-pop-up .content .item:not([data-key="animation"]):not([data-key="theme-mode"]) .variants-container .variant:hover {
    opacity: 1 !important;
}

/* Settings Popup Specific Styles */
#settings-pop-up .item#btn-privacy-policy a,
#settings-pop-up .item#btn-terms-of-use a,
#settings-pop-up .item#btn-about-us a {
    color: var(--color-text-primary);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Invert arrow for specific settings items in light mode */
body.light #settings-pop-up .item#btn-account-management img {
    filter: invert(1);
}
