/*
 * SPEC-designstudio-build.md P-8: today's LVD dots and popup (computed styles of the
 * lada-editor.css page, DDEV 2026-11-03), without depending on lada-editor.css.
 * Desktop ≥ 769px, mobile ≤ 768px, matching the old hide-below-769 / hide-above-768 split.
 */

/* Design area */
.lvd-ds-design__frame {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}
.lvd-ds-design__canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity .15s ease-out;
}
.lvd-ds-design__canvas.is-drawn {
    opacity: 1;
}

/* Colour section */
.lvd-ds-colors {
    border-top: 1px solid #D2D2D2;
    color: #374151;
    font-size: 12px;
    line-height: 18px;
}
.lvd-ds-colors__inner {
    position: relative;
    margin: 0 0 10px;
    padding: 15px 0 50px;
    border-bottom: 1px solid #D2D2D2;
}
.lvd-ds-colors__heading {
    margin: 0 0 18px;
    color: #263138;
    font-family: CanelaThin, serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 38.4px;
}
.lvd-ds-colors__heading-mobile {
    display: none;
}
.lvd-ds-colors__dots {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    padding: 0 15px;
}
.lvd-ds-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    text-align: center;
}
.lvd-ds-dot__swatch {
    display: block;
    width: 78px;
    height: 78px;
    margin: 0 6px;
    padding: 0;
    border: 1px solid #C7C7C7;
    border-radius: 50%;
    background-color: #FFFFFF;
    cursor: pointer;
}
.lvd-ds-dot__swatch.is-active {
    border: 1px dashed #937C66;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #937C66;
}
.lvd-ds-dot__swatch.is-hidden {
    background: linear-gradient(to top right, #FFFFFF calc(50% - 1px), #C7C7C7, #FFFFFF calc(50% + 1px));
}
.lvd-ds-dot__label,
.lvd-ds-dot__name {
    display: block;
    width: 100%;
    color: #263138;
    font-family: Lato, Arial, sans-serif;
    font-size: 11.2px;
    font-weight: 400;
    line-height: 12.88px;
    cursor: pointer;
}
.lvd-ds-dot__label {
    margin: 6px 0 .56px;
    padding-top: 2.8px;
    letter-spacing: .75px;
    text-transform: uppercase;
}
.lvd-ds-dot__name {
    margin-top: 1px;
    text-transform: lowercase;
}

/* Popup */
.lvd-ds-popup {
    position: absolute;
    z-index: 30;
    left: 15px;
    right: 0;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.lvd-ds-popup__header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 44px;
    padding: 6px 12px;
    border: 1px solid #E2E3E4;
    background-color: #F7F8F6;
}
.lvd-ds-popup__title {
    display: none;
}
.lvd-ds-popup__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    padding: 0;
    border: 1px solid #CBCBCB;
    border-radius: 50%;
    background-color: #A4655C;
    color: #FFFFFF;
    font-family: Montserrat-regular, Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
}
.lvd-ds-popup__choices {
    display: flex;
    flex-wrap: wrap;
    max-height: 290px;
    margin: 0;
    padding: 5px 8px 0 12px;
    overflow-y: auto;
    list-style: none;
}
.lvd-ds-popup__choices li {
    display: flex;
    align-items: center;
    width: 25%;
    height: 30px;
    margin: 0 0 11.86px;
    border-radius: 3px;
    color: #263138;
    font-family: Montserrat-regular, Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
    overflow: hidden;
}
.lvd-ds-popup__choices span {
    display: block;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 1px;
    border: 1px solid #E2E3E4;
    border-radius: 20px;
}
.lvd-ds-popup__choices label {
    margin: 0 0 0 4px;
    font-size: 12.8px;
    line-height: 19.2px;
    text-align: left;
    text-transform: capitalize;
    white-space: nowrap;
    cursor: pointer;
}
.lvd-ds-popup__choices li.is-current span {
    border-color: #EEEEEE;
}
.lvd-ds-popup__choices li.is-current label {
    font-weight: 700;
}
.lvd-ds-popup__hide span {
    background: #FFFFFF;
}

@media (max-width: 768px) {
    .lvd-ds-colors {
        padding: 0 24px;
        border-top: 0;
    }
    .lvd-ds-colors__inner {
        margin: 0;
        padding: 0;
        border-bottom: 0;
    }
    .lvd-ds-colors__heading {
        display: none;
    }
    .lvd-ds-colors__heading-mobile {
        display: block;
        margin: 0 0 12px;
        color: #263138;
        font-family: Filosofia, Didot, "Bodoni MT", Palatino, serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 30px;
    }
    .lvd-ds-colors__heading-mobile span {
        margin-left: .75rem;
        font-family: CanelaLightItalic, serif;
        font-style: italic;
    }
    /* One sideways-scrolling row, as LADA's wallpaper flow (lada-editor.css .is-wallpaper-options-flow .color-boxes). */
    .lvd-ds-colors__dots {
        flex-wrap: nowrap;
        gap: 22px;
        margin: 0 0 18px;
        padding: 4px 0 2px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }
    .lvd-ds-dot {
        flex: 0 0 72px;
        width: 72px;
        min-width: 0;
        scroll-snap-align: start;
    }
    .lvd-ds-dot__swatch {
        width: 40px;
        height: 40px;
        margin: .6px auto;
    }
    .lvd-ds-dot__label {
        margin: 8px 0 .475px;
        padding-top: 2.375px;
        font-size: 9.5px;
        letter-spacing: .5px;
        line-height: 9.5px;
    }
    .lvd-ds-dot__name {
        margin-top: 2px;
        font-size: 10px;
        line-height: 10px;
    }
    .lvd-ds-popup {
        position: fixed;
        z-index: 20002;
        inset: 0;
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }
    .lvd-ds-popup__header {
        flex: 0 0 auto;
        justify-content: space-between;
        color: #333333;
    }
    .lvd-ds-popup__title {
        display: block;
        font-size: 14px;
    }
    /* The CC page's mobile grid (LADA .color-pop, measured 2026-11-06): 37 px rows, 25 px swatches. */
    .lvd-ds-popup__choices {
        flex: 1 1 auto;
        max-height: none;
        align-content: flex-start;
        padding: 6px;
    }
    .lvd-ds-popup__choices li {
        width: 33.333%;
        height: 37px;
        margin: 0;
        padding: 6px;
    }
    .lvd-ds-popup__choices span {
        flex: 0 0 25px;
        width: 25px;
        height: 25px;
    }
}
