/******************* Legend styling *******************/

#legend-div {
    display: flex;
    flex-direction: row;
    background-color: none;
    border-radius: 15px;
    box-shadow: 3px 3px 3px 1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Flexbox arrangement fails with 'position: absolute' */
#legend-div div {
    position: static;
}

.legend-box-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.legend-box-container p {
    display: flex;
    font-size: 14px;
    margin-left: 4px;
    white-space: nowrap;
}

.legend-box {
    display: flex;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-title-container {
    height: 100%;
    width: 40px;
    display: inline-block;
    background-color: #42926b;
    overflow: visible;
}

.legend-title {
    text-align: center;
    font-weight: bold;
    vertical-align: middle;
    width: 90px;
    height: 40px;
    font-size: 14px;
    color: white;
    position: relative;
    transform-origin: 0 0;
    transform: rotate(-90deg) translate(-77px, 3px);
}

.sys-var-container::-webkit-scrollbar, .linear-solvers-container::-webkit-scrollbar, .n2-symbols-container::-webkit-scrollbar {
    display: none;
}

/* Systems and Varaibles Container */

.sys-var-container {
    height: 90px;
    border-radius: 15px;
    border: 1px solid #98daba;
    display: flex;
    flex-direction: row;
    background-color: white;
    z-index: 1;
    overflow-y: scroll;
}

#sys-var-legend {
    height: 90px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    margin-right: 45px;
    overflow-x: hidden;
}

/* N2 Symbols Group */

.n2-symbols-container {
    height: 90px;
    min-height: 90px;
    border-radius: 15px;
    border: 1px solid #66b48e;
    display: flex;
    align-items: center;
    padding-right: 45px;
    background-color: white;
    z-index: 2;
    overflow: hidden;
    margin-left: -20px;
}

#symbols-legend {
    display: flex;
    width: auto;
    flex-direction: column;
    padding-left: 8px;
}

.symbol {
    display: flex;
    align-items: center;
    margin: 2px 0;
}

.symbol p {
    font-size: 14px;
    margin: 0;
    margin-left: 8px;
    white-space: nowrap;
}

.symbol-outer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
}

.symbol-inner {
    position: absolute;
    margin: 0 auto;
}

.scalar {
    border: 2px solid #cecece;
}

.scalar .symbol-inner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #9fc4c6;
}

.vector {
    border: 2px solid #cecece;
}

.vector .symbol-inner {
    width: 12px;
    height: 12px;
    background-color: #9fc4c6;
}

.collapsed {
    border: 2px solid #9fc4c6;
}

.collapsed .symbol-inner {
    width: 12px;
    height: 12px;
    background-color: #9fc4c6;
}

/* Linear Solvers Group */

.linear-solvers-container {
    height: 90px;
    border-radius: 15px;
    border: 1px solid #42926b;
    display: flex;
    flex-direction: row;
    margin-left: -20px;
    margin-right: 0;
    background-color: white;
    z-index: 3;
    overflow: hidden;
}

#solvers-legend {
    height: 90px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    margin-right: 20px;
    overflow-x: hidden;
}

.draggable {
    position: absolute;
    width: 100px;
    height: 20px;
    left: 50%;
    background-color: #42926b;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -20px)
}

.draggable>.icon-key {
    color: white;
}

.draggable-legend-dots p {
    color: white;
    margin-left: 5px;
    margin-right: 5px;
}

