.agd-personalization {
    clear: both;
    margin: 0 0 18px;
}
.agd-personalization .agd-launcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #c7d6e7;
    border-radius: 12px;
    background: #f5f8fc;
    color: #234f80;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.agd-personalization .agd-launcher:hover { background: #eaf2fc; }

html:has(.agd-editor[open]) { overflow: hidden; }
.agd-editor:not([open]) { display: none; }
.agd-editor[open] {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #f4f7fb;
    color: #1f2937;
    overflow: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
}
.agd-editor::backdrop { background: #172337; }
.agd-editor form {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    margin: 0;
}
.agd-editor-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: #fff;
    border-bottom: 1px solid #d5deea;
}
.agd-editor-header h2 {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    margin: 0;
    font-size: clamp(14px, 2vw, 20px);
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
}
.agd-editor-header button,
.agd-toolbar button {
    flex: none;
    margin: 0;
    min-height: 44px;
    border: 1px solid #cad5e3;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
}

.agd-editor-header .agd-close { width: 44px; padding: 0; border-color: transparent; font-size: 25px; }
.agd-editor-header .agd-cart-button { border-color: #1d588c; background: #245f95; color: #fff; }
.agd-editor-header button[aria-pressed="true"], .agd-toolbar button[aria-expanded="true"] { background: #eaf2fa; color: #174b77; }
.agd-editor button:focus-visible, .agd-product-choice input:focus-visible + span { outline: 2px solid #1d588c; outline-offset: 2px; }

.agd-workspace {
    flex: 1;
    min-height: 0;
    display: flex;
}
.agd-toolbar {
    flex: none;
    display: flex;
    padding: 8px;
    border-right: 1px solid #d5deea;
    background: #fff;
}
.agd-toolbar button { align-self: start; display: grid; justify-items: center; gap: 4px; border-color: transparent; }
.agd-product-picker {
    flex: 0 0 240px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px;
    min-width: 0;
    margin: 0;
    border: 0;
    border-right: 1px solid #d5deea;
    padding: 10px;
    background: #fff;
    overflow: auto;
}
.agd-product-picker[hidden] { display: none; }
.agd-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.agd-product-choice { position: relative; margin: 0; cursor: pointer; }
.agd-product-tile {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 5px;
    height: 100%;
    border: 2px solid #d5deea;
    border-radius: 8px;
    padding: 5px;
    color: #1f2937;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
}
.agd-product-tile img { display: block; width: 100%; height: 62px; object-fit: contain; }
.agd-product-choice input:checked + span { border-color: #245f95; background: #eaf2fa; }

.agd-editor-preview {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.agd-canvas {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(8px, 2vw, 24px);
    background: radial-gradient(circle, #d7dfe9 1px, transparent 1.5px) 0 0 / 20px 20px #edf1f6;
    container-type: size;
}
.agd-stage {
    position: relative;
    width: min(100%, calc(100cqh * var(--agd-photo-ratio, 1)));
    background: #fff;
    border-radius: 8px;
}
.agd-stage .agd-photo { display: block; width: 100%; height: auto; border-radius: inherit; }
.agd-print-zone { position: absolute; }
.agd-print-zone > span {
    position: absolute;
    bottom: 100%;
    left: 0;
    padding: 2px 5px;
    border-radius: 4px 4px 0 0;
    background: #1f2937;
    color: #fff;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}
.agd-frame { display: block; width: 100%; height: 100%; outline: 1px dashed #52667a; overflow: hidden; }
.agd-support-price { margin-left: auto; padding: 4px 8px; border-radius: 6px; color: #145638; background: #e7f5ed; font-weight: 650; }
.agd-preview-mode .agd-toolbar,
.agd-preview-mode .agd-product-picker,
.agd-preview-mode .agd-print-zone > span { display: none; }

.agd-preview-mode .agd-frame { outline: 0; pointer-events: none; }

@media (max-width: 680px) {
    .agd-workspace { flex-direction: column; }
    .agd-toolbar {
        order: 2;
        padding: 4px 10px max(4px, env(safe-area-inset-bottom));
        justify-content: center;
        border: 0;
        border-top: 1px solid #d5deea;
    }
    .agd-toolbar button { display: flex; align-items: center; gap: 6px; }
    .agd-product-picker {
        order: 1;
        flex: none;
        display: flex;
        padding: 7px 10px;
        border: 0;
        border-top: 1px solid #d5deea;
        overflow-x: auto;
    }
    .agd-product-choice { flex: 0 0 91px; }
    .agd-product-tile img { height: 49px; }
    .agd-editor-header { gap: 4px; padding-inline: 5px; }
    .agd-editor-header button { font-size: 12px; padding-inline: 7px; }
    .agd-editor-header .agd-close { width: 35px; font-size: 22px; }
}

.agd-editor-header {
    gap: 7px;
    min-height: 66px;
    box-sizing: border-box;
}
.agd-editor-header .agd-close { border: 0; }
.agd-editor-header .agd-preview-button { display: inline-flex; align-items: center; gap: 6px; }
.agd-editor-header svg, .agd-toolbar svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.agd-editor-header .agd-cart-button {
    border-radius: 9px;
    padding-inline: 14px;
    box-shadow: inset 0 1px 2px #ffffff55, 0 2px 6px #193b6050;
}
.agd-toolbar { flex-direction: column; align-items: stretch; gap: 6px; }
.agd-toolbar button { width: 100%; }
.agd-canvas { position: relative; }
.agd-print-zone > span {
    bottom: auto;
    top: 0;
    left: 6px;
    transform: translateY(-50%);
    border-radius: 4px;
    padding: 3px 6px;
    text-transform: uppercase;
    letter-spacing: .025em;
}
.agd-support-price {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    border-radius: 9px;
    color: #fff;
    background: #116841;
    box-shadow: 0 2px 7px #142f2950;
    font-size: 14px;
    pointer-events: none;
}

@media (max-width: 680px) {
    .agd-editor-header { gap: 4px; padding-inline: 4px; }
    .agd-editor-header .agd-close { width: 34px; }
    .agd-editor-header .agd-preview-button { justify-content: center; width: 34px; padding: 0; }
    .agd-editor-header .agd-preview-button span { display: none; }
    .agd-editor-header .agd-cart-button { padding-inline: 8px; }
    .agd-canvas { background: #fff; padding-inline: 0; }
    .agd-stage { border-radius: 0; }
    .agd-toolbar { flex-direction: row; justify-content: center; gap: 12px; }
    .agd-toolbar button {
        width: auto;
        min-width: 86px;
        display: grid;
        padding: 4px 8px;
        align-content: center;
    }
}/* E-commerce themes can apply opaque backgrounds and decorative layers to every button. */
#agd-configurator,
#agd-configurator .agd-editor-header,
#agd-configurator .agd-toolbar {
    color-scheme: light;
}

#agd-configurator button,
.agd-personalization > button.agd-launcher {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #fff !important;
    color: #1f2937 !important;
    border-color: #cad5e3 !important;
    text-shadow: none !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}
#agd-configurator button::before,
#agd-configurator button::after,
.agd-personalization > button.agd-launcher::before,
.agd-personalization > button.agd-launcher::after {
    content: none !important;
    display: none !important;
}
#agd-configurator .agd-toolbar button[aria-expanded="true"],
#agd-configurator .agd-preview-button[aria-pressed="true"],
.agd-personalization > button.agd-launcher:hover {
    background: #eaf2fa !important;
    color: #174b77 !important;
}
#agd-configurator button.agd-cart-button {
    background: #245f95 !important;
    color: #fff !important;
    border-color: #1d588c !important;
}
#agd-configurator button.agd-cart-button:hover { background: #1d527f !important; }
#agd-configurator button:disabled { opacity: .5 !important; }

#agd-configurator { background: #fff; }
#agd-configurator .agd-editor-header h2 { text-align: left; font-weight: 600; }
#agd-configurator .agd-preview-button { border-radius: 10px !important; }
#agd-configurator .agd-toolbar button {
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}
#agd-configurator .agd-toolbar button[aria-expanded="true"] { border-color: #cadcec !important; }
#agd-configurator .agd-canvas { overflow: hidden; }
#agd-configurator .agd-frame { outline-color: #7c8999; }
#agd-configurator.agd-preview-mode .agd-frame { outline: none; }

@media (max-width: 680px) {
    #agd-configurator .agd-editor-header { gap: 5px; padding-inline: 8px; }
    #agd-configurator .agd-editor-header h2 { padding-left: 4px; }
    #agd-configurator .agd-toolbar { justify-content: center; gap: 4px; }
    #agd-configurator .agd-toolbar button { min-width: 96px; min-height: 51px; gap: 3px; }
    #agd-configurator .agd-canvas {
        background: radial-gradient(circle, #e1e7ee 1px, transparent 1.5px) 0 0 / 19px 19px #f7f9fc;
    }
    #agd-configurator .agd-stage { box-shadow: 0 1px 8px #17293e12; }
}

#agd-configurator .agd-toolbar { gap: 8px; padding: 10px 8px; }
#agd-configurator .agd-toolbar button {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 84px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 68px !important;
    max-height: none !important;
    gap: 5px;
    padding: 6px !important;
    overflow: visible !important;
    font-size: 12px;
    font-weight: 650;
}
#agd-configurator .agd-tool-label {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
}
.agd-tool-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #f0f5fb;
    color: #245f95;
}
#agd-configurator .agd-toolbar button:hover .agd-tool-icon,
#agd-configurator .agd-toolbar button[aria-expanded="true"] .agd-tool-icon {
    background: #dceaf9;
}
.agd-visual-picker {
    flex: 0 0 260px;
    min-width: 0;
    padding: 10px;
    border-right: 1px solid #d5deea;
    background: #fff;
    overflow: auto;
}
.agd-visual-picker[hidden] { display: none; }
.agd-visual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
#agd-configurator button.agd-visual-tile {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 15px;
    align-items: stretch !important;
    gap: 4px;
    width: 100% !important;
    min-width: 0 !important;
    height: 98px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 6px !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 1px solid #d5deea;
    border-radius: 8px !important;
    font: inherit;
    font-size: 11px;
    line-height: 15px !important;
    cursor: pointer;
}
#agd-configurator .agd-visual-thumbnail {
    display: block !important;
    position: relative !important;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
#agd-configurator .agd-visual-thumbnail img {
    position: absolute !important;
    inset: 0;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
}
#agd-configurator .agd-visual-name {
    display: block !important;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
#agd-configurator button.agd-visual-tile[aria-pressed="true"] {
    background: #eaf2fa !important;
    border-color: #245f95 !important;
}
.agd-visual-status:empty { display: none; }
.agd-visual-status { margin: 0 0 8px; font-size: 12px; }
@media (max-width: 680px) {
    #agd-configurator .agd-toolbar { padding: 4px 8px max(4px, env(safe-area-inset-bottom)); }
    #agd-configurator .agd-toolbar button { min-height: 57px !important; padding: 4px !important; }
    .agd-tool-icon { width: 33px; height: 32px; }
    .agd-visual-picker { order: 1; flex: none; padding: 6px 9px; border: 0; border-top: 1px solid #d5deea; }
    .agd-visual-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 88px; grid-template-columns: none; }
    #agd-configurator button.agd-visual-tile { height: 76px !important; }
}

#agd-configurator .agd-colour-picker {
    flex:none;
    display:flex;
    align-items:start;
    justify-content:center;
    gap:8px;
    min-width:0;
    max-height:105px;
    overflow-x:auto;
    margin:0;
    padding:8px 12px;
    border:0;
    border-bottom:1px solid #d5deea;
    background:#fff;
}
#agd-configurator .agd-colour-picker[hidden],
#agd-configurator .agd-colour-choice[hidden] { display:none; }
.agd-colour-choice { flex:0 0 75px; position:relative; margin:0; cursor:pointer; }
.agd-colour-tile {
    display:grid;
    justify-items:center;
    gap:3px;
    padding:4px;
    border:2px solid #d5deea;
    border-radius:9px;
    background:#fff;
    font-size:11px;
    color:#1f2937;
}
.agd-colour-tile img { width:60px; height:43px; object-fit:contain; }
.agd-colour-tile > span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agd-colour-choice input:checked + span { border-color:#245f95; background:#eef5fc; }
.agd-colour-choice input:focus-visible + span { outline:2px solid #245f95; outline-offset:2px; }
#agd-configurator.agd-preview-mode .agd-colour-picker { display:none; }

/* The gallery is always present, beside the desktop preview and below it on mobile. */
#agd-configurator .agd-editor-preview { order: 1; }
#agd-configurator .agd-visual-picker {
    order: 2;
    box-sizing: border-box;
    flex: 0 0 260px;
    min-height: 0;
    border-right: 0;
    border-left: 1px solid #d5deea;
}
#agd-configurator .agd-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-flow: row;
}
@media (max-width: 680px) {
    #agd-configurator .agd-editor-preview { order: 0; }
    #agd-configurator .agd-product-picker { order: -1; max-height: 110px; }
    #agd-configurator .agd-visual-picker {
        order: 1;
        flex: none;
        max-width: 100%;
        padding: 6px 9px;
        border-left: 0;
        border-top: 1px solid #d5deea;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
    }
    #agd-configurator .agd-visual-grid {
        grid-template-columns: none;
        grid-template-rows: repeat(2, 70px);
        grid-auto-flow: column;
        grid-auto-columns: 78px;
        gap: 5px;
    }
    #agd-configurator button.agd-visual-tile { height: 70px !important; }
    #agd-configurator .agd-toolbar { order: 2; }
}

/* Product and colour choices share the strip above the preview. */
#agd-configurator .agd-visual-picker {
    order: 0;
    border-left: 0;
    border-right: 1px solid #d5deea;
}
#agd-configurator .agd-editor-preview { order: 1; }
#agd-configurator .agd-product-options {
    flex: none;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #d5deea;
    background: #fff;
}
#agd-configurator .agd-product-options .agd-toolbar {
    flex: none;
    border: 0;
    padding: 0;
    order: 0;
}
#agd-configurator .agd-product-options .agd-toolbar button {
    width: 106px !important;
    min-height: 62px !important;
    gap: 3px;
    padding: 4px !important;
}
#agd-configurator .agd-product-options .agd-tool-label {
    font-size: 11px;
    white-space: normal !important;
    text-align: center;
}
#agd-configurator .agd-product-options .agd-colour-picker {
    flex: 1;
    justify-content: flex-start;
    padding: 0 3px;
    border: 0;
    min-width: 0;
}
#agd-configurator .agd-product-options .agd-product-picker {
    flex: 1;
    display: flex;
    gap: 7px;
    padding: 0 3px;
    border: 0;
    max-height: 105px;
    overflow: auto;
    order: 1;
}
#agd-configurator .agd-product-options .agd-product-picker[hidden] { display: none; }
#agd-configurator .agd-product-options .agd-product-choice { flex: 0 0 88px; }
#agd-configurator .agd-product-options .agd-product-tile {
    box-sizing: border-box;
    height: 88px;
    padding: 4px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.2;
}
#agd-configurator .agd-product-options .agd-product-tile img { height: 48px; }
#agd-configurator.agd-preview-mode .agd-product-options { display: none; }

@media (max-width: 680px) {
    #agd-configurator .agd-editor-preview { order: 0; }
    #agd-configurator .agd-visual-picker { order: 1; border-right: 0; }
    #agd-configurator .agd-product-options { gap: 4px; padding: 5px; }
    #agd-configurator .agd-product-options .agd-toolbar button {
        width: 84px !important;
        min-height: 63px !important;
    }
    #agd-configurator .agd-product-options .agd-colour-picker { max-height: 80px; }
    #agd-configurator .agd-product-options .agd-product-picker { max-height: 80px; }
    #agd-configurator .agd-product-options .agd-product-choice { flex-basis: 76px; }
    #agd-configurator .agd-product-options .agd-product-tile { height: 74px; }
    #agd-configurator .agd-product-options .agd-product-tile img { height: 36px; }
    #agd-configurator .agd-colour-choice { flex-basis: 65px; }
    #agd-configurator .agd-colour-tile img { height: 36px; width: 53px; }
}

/* The product chooser shares the purchase row and controls the strip below it. */
#agd-configurator button.agd-choose-product {
    background: linear-gradient(180deg, #46b87d 0%, #24945b 46%, #187b48 50%, #116b3e 100%) !important;
    color: #fff !important;
    border: 1px solid #126b40 !important;
    border-radius: 9px !important;
    min-height: 44px;
    padding: 6px 14px;
    font-weight: 650;
    box-shadow: inset 0 1px 2px #ffffffaa, inset 0 0 0 1px #ffffff25, 0 2px 6px #16452c40 !important;
}
#agd-configurator button.agd-choose-product:hover,
#agd-configurator button.agd-choose-product[aria-expanded="true"] {
    background: linear-gradient(180deg, #3aa771 0%, #16864d 46%, #106d3d 50%, #0c6035 100%) !important;
}
#agd-configurator form > .agd-product-options {
    box-sizing: border-box;
    width: 100%;
    flex: none;
    min-height: 88px;
    padding: 6px 12px;
}
#agd-configurator form > .agd-product-options .agd-product-picker,
#agd-configurator form > .agd-product-options .agd-colour-picker {
    flex: 1 1 0;
    width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
@media(max-width:680px) {
    #agd-configurator .agd-editor-header {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) 32px minmax(0, 1fr);
        align-items: stretch;
        gap: 5px;
        min-height: 60px;
        padding: max(7px, env(safe-area-inset-top)) 7px 7px;
    }
    #agd-configurator .agd-editor-header h2 {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    #agd-configurator .agd-editor-header .agd-close { width: 28px; grid-column: 1; grid-row: 1; }
    #agd-configurator .agd-editor-header .agd-preview-button { width: 32px; grid-column: 3; grid-row: 1; }
    #agd-configurator .agd-editor-header .agd-choose-product { grid-column: 2; grid-row: 1; }
    #agd-configurator .agd-editor-header .agd-cart-button { grid-column: 4; grid-row: 1; }
    #agd-configurator .agd-editor-header .agd-choose-product,
    #agd-configurator .agd-editor-header .agd-cart-button {
        width: 100%;
        min-width: 0;
        padding-inline: 3px;
        font-size: 11px;
        line-height: 1.15;
        white-space: nowrap;
    }
    #agd-configurator form > .agd-product-options { min-height: 80px; padding: 4px 8px; }
}

/* Customer view shows the finished product with the chooser at the left. */
#agd-configurator .agd-frame {
    outline: none !important;
    border: 0 !important;
}
@media(min-width:681px) {
    #agd-configurator .agd-editor-header {
        display: grid;
        grid-template-columns: 44px auto minmax(0, 1fr) auto;
        gap: 10px;
    }
    #agd-configurator .agd-editor-header h2 {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    #agd-configurator .agd-editor-header .agd-close { grid-column: 1; grid-row: 1; }
    #agd-configurator .agd-editor-header .agd-choose-product { grid-column: 2; grid-row: 1; }
    #agd-configurator .agd-editor-header .agd-cart-button { grid-column: 4; grid-row: 1; }
}
@media(max-width:680px) {
    #agd-configurator .agd-editor-header {
        grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
    }
    #agd-configurator .agd-editor-header .agd-cart-button { grid-column: 3; }
}

/* Product and colour captions sit outside the image tiles on a single line. */
#agd-configurator .agd-product-options .agd-product-choice,
#agd-configurator .agd-product-options .agd-colour-choice {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 88px;
    padding-inline: 3px;
    margin: 0;
}
#agd-configurator .agd-product-options .agd-product-tile,
#agd-configurator .agd-product-options .agd-colour-tile {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: 80px;
    height: 59px;
    padding: 3px;
    margin: 0;
}
#agd-configurator .agd-product-options .agd-product-tile img,
#agd-configurator .agd-product-options .agd-colour-tile img {
    width: 70px;
    height: 49px;
    object-fit: contain;
}
#agd-configurator .agd-product-caption {
    display: block;
    color: #1f2937;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
}
@media(max-width:680px) {
    #agd-configurator form > .agd-product-options { min-height: 82px; }
    #agd-configurator .agd-product-options .agd-product-choice,
    #agd-configurator .agd-product-options .agd-colour-choice { min-width: 70px; }
    #agd-configurator .agd-product-options .agd-product-tile,
    #agd-configurator .agd-product-options .agd-colour-tile { width: 64px; height: 51px; }
    #agd-configurator .agd-product-options .agd-product-tile img,
    #agd-configurator .agd-product-options .agd-colour-tile img { width: 56px; height: 43px; }
    #agd-configurator .agd-product-caption { font-size: 11px; }
}

#agd-configurator .agd-selected-product {
    flex: none;
    margin: 0;
    padding: 3px 12px 7px;
    border-bottom: 1px solid #d5deea;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow-x: auto;
}
#agd-configurator form > .agd-product-options { border-bottom: 0; min-height: 70px; }
#agd-configurator .agd-product-options .agd-product-choice,
#agd-configurator .agd-product-options .agd-colour-choice { gap: 0; }
@media(max-width:680px) {
    #agd-configurator form > .agd-product-options { min-height: 60px; }
}

/* Filtering must take precedence over the flex layout of each colour tile. */
#agd-configurator .agd-product-options .agd-colour-choice[hidden],
#agd-configurator .agd-product-options .agd-colour-picker[hidden],
#agd-configurator .agd-product-options .agd-product-picker[hidden] {
    display: none !important;
}
