.peerpair-container {
    font-size: 1rem;
    background-color: white;
    border-radius: 0.5em;
    padding: 1em;
}

.peerpair-add-subheader {
    padding: 0.5em;
    font-weight: 800;
}

.peerpair-add-container {
    padding: 0.5em;
    border-bottom: 1px solid gray;
}

.peerpair-add-container:last-child {
    border-bottom: none;
}

.peerpair-add-container:hover {
    background-color: #dff0d8;
}

.component-p2p-peerpair-add-pair-container {
    display: flex;
    justify-content: space-between;
}

.component-p2p-peerpair-add-pair-item {
    display: flex;
    flex-direction: column;
}

.component-p2p-peerpair-add-pair-item strong {
    font-weight: 800;
}
.component-p2p-peerpair-add-pair-item.right {
    justify-content: flex-end;
    text-align: right;
}

.p2p-course-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5em;
    width: 100%;
}

@media (max-width: 1400px) {
    .p2p-course-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 1100px) {
    .p2p-course-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .p2p-course-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 500px) {
    .p2p-course-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

.p2p-course-summary {
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px 3px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #d6d6d6;
}

.p2p-course-item {
    background-color: white;
    display: grid;
    grid-template-columns: 0.4fr 1.4fr;
    grid-template-rows: 0.6fr 1.8fr 0.6fr;
    gap: 3px 3px;
    grid-auto-flow: row;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #d6d6d6;
    color: black !important;
}

.p2p-course-item.green {
    background-color: #e5f6e5;
}

.p2p-course-item.red {
    background-color: #f9e4e4;
}

.p2p-course-item .img {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-width: 75px;
}

.p2p-course-item .prices_place {
    align-self: start;
}

.p2p-course-item .price {
    font-size: 1.6rem;
}

.p2p-course-item .name {
    align-self: center;
    justify-self: end;
}

.courses-center {
    align-self: center;
    justify-self: center;
}

.p2p-course-item .counter {
    align-self: center;
    justify-self: end;
}

.p2p-filter-container {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    border-bottom: 1px solid #d1d1d1;
    margin-bottom: 1em;
}

.p2p-filter-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 1em;
    gap: 0.5em;
}

.p2p-filter-item .center{
    display: flex;
    align-items: center;
    justify-content: center;
}

.p2p-filter-item .bold{
    font-weight: 800;
}

.p2p-filter-item .title {
    font-size: 1em;
    font-weight: 800;
}

.p2p-filter-item-btn {
    border: 1px solid #dedede;
    border-radius: 3px;
    padding: 0px 3px;
}

.p2p-filter-item-btn.active {
    background-color: #686868;
    border: 1px solid #686868;
    color: white;
}

.p2p-filter-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap:0.5em;
}

.unselected {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.pairs-selectedcourse-header {
    display:flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid gray;
    padding-bottom: .5em;
    margin-bottom: .5em;
}

.pairs-selectedcourse-header .title {
    font-size: 1.2em;
} 

.pairs-selectedcourse-pair-container {
    margin-bottom: 1em;
}

.pairs-selectedcourse-pair-container.changed {
    background-color: #f7f7ac8f;
}

.editor-course-container.changed {
    background-color: #f7f7ac8f;
}

.p2p-pair-editor-course.changed {
    background-color: #f7f7ac8f;
}

@media (max-width: 900px) {
    .pairs-selectedcourse-pairs ol {
        padding-left: 1em;
        font-size: 0.9em;
    }
}

.pair-editor-blocked {
    color:red;
}

.icon-vertical-center {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.pair-editor-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.pair-editor-vis-btns {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    column-gap: 1em;
    row-gap: 0.5em;
}

.pair-editor-vis-red img {
    filter: brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(7404%) hue-rotate(0deg) brightness(95%) contrast(118%);
}

.pair-editor-vis-red {
    color: red;
}

.pair-editor-vis-green img {
    filter: brightness(0) saturate(100%) invert(26%) sepia(89%) saturate(1583%) hue-rotate(92deg) brightness(98%) contrast(101%);
}

.pair-editor-vis-green {
    color: green;
}
.pair-editor-vis-btn {
    border: 1px gray solid;
    border-radius: 3px;
    padding: 0.2em 0.5em;
}

.pair-editor-vis-btn.active {
    background-color: gray;
    color: white; 
}

.pair-editor-vis-btn.active {
    background-color: gray;
    color: white; 
}

.pair-editor-vis-green.active {
    background-color: green;
    color: white; 
    border: 1px green solid;
}

.pair-editor-vis-red.active {
    background-color: red;
    color: white; 
    border: 1px red solid;
}


.pair-editor-vis-btn.active img {
    filter: brightness(0) invert(1);
}

.pair-editor-vis-addcode {
    display: flex;
    justify-content: space-between;
}

.ml1 {
    margin-left: 1em;
}

.peerpair-add-container.active {
    background-color: yellow;
    border: 1px solid black;
    border-radius: 3px;
}

.p2p-pairs-form ._btn-small {
    min-width: unset;
}

.p2p-pairs-form .popup__inner {
    gap: 0.5em;
}

.p2p-pairs-form ol {
    margin: 1em 2em;
    padding-left: 0;
}

.p2p-pairs-form .button._red:hover {
    background-color: #f2cdcc;
    color: red;
}

.p2p-pairs-form .button._sell:hover {
    background-color: #f2cdcc;
    color: red;
}

.p2p-pairs-form .dialog--btns {
    margin-top: 1em;
}

.p2p-pairs-form h4 {
    font-weight: 800;
}

.mt1 {
    margin-top: 1em !important;
}

.gap05 {
    gap: 0.5em;
}

.flex-wrap {
    flex-wrap: wrap;
}

.course-source {
    font-size: 0.7em;
}

.p2p-course-item .ticker {
    text-wrap: nowrap;
}

.pair-editor-conds-preview-container {
    position: relative;
    margin-top: 10px;
    margin-bottom: 15px;
}

.pair-editor-conds-preview {
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.pair-editor-conds-preview.collapsed {
    max-height: 100px;
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

.pair-editor-conds-preview:not(.collapsed) {
    max-height: 5000px;
    -webkit-mask-image: none;
    mask-image: none;
}

.pair-editor-conds-toggle {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 2;
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}

.preview-columns {
    display: flex;
    gap: 20px;
    cursor: pointer;
}

.preview-col {
    flex: 1;
    min-width: 0;
    margin-bottom: 25px;
}

.preview-text {
    min-height: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}

.underline {
    text-decoration: underline;
}

.pair-editor-conds-container {
    width: 100%;
    max-height: 70vh;
    overflow: auto;
}

.pair-editor-conds-columns {
    display: flex;
    gap: 10px;
    width: 100%;
}

.pair-editor-conds-col {
    flex: 1;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.pair-editor-conds-col h4{
    text-wrap: nowrap;
}

.pair-editor-conds-col.active {
    flex: 3;
    z-index: 2;
}

.pair-editor-conds-textarea {
    width: 100%;
    min-height: 200px;
    max-height: 40vh;
    resize: vertical;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: text;
}

.p2p-course-summary-container {
    display: flex;
    gap: 0.5em;
    color: gray;
}

.p2p-course-summary-item {
    display: inline-flex;
    gap:0.1em;
    align-items: center;
    font-size: 0.9em;
}

.p2p-course-summary-item img {
    width: 0.8em;
    height: 0.8em;
    opacity: 0.7;
}

.p2p-pairs-course-line-container {
    display: flex;
    gap:0.3em;
    align-items: center;
}

.pair-metrics-container img{
    width: 1em !important;
    height: 1em !important;
}

.pair-metrics-container-ml {
    margin-left: 1em;
}

.p2p-price-warning {
    color: red;
    border: 1px solid red;
    background-color: #f7c7c7;
    padding: 4px;
    margin: 3px;
    border-radius: 3px;
}
