.mdc-gc {
    --mdc-primary: #183888;
    --mdc-primary-dark: #102968;
    --mdc-secondary: #8898b0;
    --mdc-ink: #172033;
    --mdc-muted: #667085;
    --mdc-line: #d8dee8;
    --mdc-surface: #ffffff;
    --mdc-soft: #f3f5f8;
    margin: 14px 0;
    font-family: inherit;
}

.mdc-gc *,
.mdc-gc *::before,
.mdc-gc *::after {
    box-sizing: border-box;
}

.mdc-gc__product-block {
    width: 100%;
}

.mdc-gc__open {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 70px;
    padding: 10px 14px !important;
    border: 1px solid var(--mdc-primary) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--mdc-primary) 0%, var(--mdc-primary-dark) 100%) !important;
    color: #fff !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 8px 20px rgba(24, 56, 136, .16);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.mdc-gc__open:hover,
.mdc-gc__open:focus-visible {
    background: linear-gradient(135deg, #21479f 0%, var(--mdc-primary-dark) 100%) !important;
    border-color: var(--mdc-primary-dark) !important;
    box-shadow: 0 10px 24px rgba(24, 56, 136, .24);
    transform: translateY(-1px);
}

.mdc-gc__open:focus-visible {
    outline: 3px solid rgba(24, 56, 136, .22) !important;
    outline-offset: 3px;
}

.mdc-gc__open.is-saved {
    background: #fff !important;
    border: 2px solid var(--mdc-primary) !important;
    color: var(--mdc-primary) !important;
    box-shadow: 0 5px 16px rgba(24, 56, 136, .12);
}

.mdc-gc__open.is-saved:hover,
.mdc-gc__open.is-saved:focus-visible {
    background: #f5f7fc !important;
}

.mdc-gc__spool-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.mdc-gc__open.is-saved .mdc-gc__spool-icon {
    background: #edf1fa;
    color: var(--mdc-primary);
}

.mdc-gc__spool-icon svg {
    display: block;
    width: 31px;
    height: 31px;
}

.mdc-gc__open-copy,
.mdc-gc__summary-copy {
    display: block;
    min-width: 0;
}

.mdc-gc__open-title,
.mdc-gc__open-subtitle,
.mdc-gc__summary-copy strong,
.mdc-gc__summary-copy small {
    display: block;
}

.mdc-gc__open-title {
    color: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.mdc-gc__open-subtitle {
    margin-top: 4px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.mdc-gc__open.is-saved .mdc-gc__open-subtitle {
    color: var(--mdc-muted);
}

.mdc-gc__open-arrow {
    color: currentColor;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    text-align: right;
    transition: transform .16s ease;
}

.mdc-gc__open:hover .mdc-gc__open-arrow,
.mdc-gc__open:focus-visible .mdc-gc__open-arrow {
    transform: translateX(2px);
}

.mdc-gc__summary[hidden] {
    display: none !important;
}

.mdc-gc__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--mdc-muted);
    font-size: 12px;
    line-height: 1.3;
}

.mdc-gc__summary-check {
    display: grid;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: #edf1fa;
    color: var(--mdc-primary);
    font-size: 12px;
    font-weight: 900;
}

.mdc-gc__summary-copy strong {
    color: var(--mdc-ink);
    font-size: 12px;
    font-weight: 800;
}

.mdc-gc__summary-status {
    margin-top: 1px;
    color: var(--mdc-muted);
    overflow-wrap: anywhere;
}

.mdc-gc__reset,
.mdc-gc__cancel {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mdc-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.mdc-gc__modal[hidden] {
    display: none !important;
}

.mdc-gc__modal {
    --mdc-primary: #183888;
    --mdc-primary-dark: #102968;
    --mdc-secondary: #8898b0;
    --mdc-ink: #172033;
    --mdc-muted: #667085;
    --mdc-line: #d8dee8;
    --mdc-surface: #ffffff;
    --mdc-soft: #f3f5f8;
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: auto;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 !important;
    padding: 24px;
    overscroll-behavior: none;
    font-family: inherit;
}

.mdc-gc__modal *,
.mdc-gc__modal *::before,
.mdc-gc__modal *::after {
    box-sizing: border-box;
}

.mdc-gc__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 25, 47, .76);
    backdrop-filter: blur(3px);
}

.mdc-gc__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1260px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 12px;
    background: var(--mdc-surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .30);
}

.mdc-gc__header,
.mdc-gc__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-color: var(--mdc-line);
    background: #fff;
}

.mdc-gc__header {
    border-bottom: 1px solid var(--mdc-line);
}

.mdc-gc__footer {
    justify-content: flex-end;
    border-top: 1px solid var(--mdc-line);
}

.mdc-gc__header h2 {
    margin: 2px 0 0;
    padding: 0;
    color: var(--mdc-ink);
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.2;
}

.mdc-gc__eyebrow {
    margin: 0;
    color: var(--mdc-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mdc-gc__close {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--mdc-line);
    border-radius: 50%;
    background: #fff;
    color: var(--mdc-ink);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.mdc-gc__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mdc-gc__stage-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    background: linear-gradient(180deg, #eef2f7 0%, #f6f7f9 100%);
}

.mdc-gc__stage-wrap {
    position: relative;
    width: min(100%, 820px);
    margin: auto;
}

.mdc-gc__canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 250px);
    border-radius: 8px;
    background: #eef1f5;
    box-shadow: 0 1px 5px rgba(16, 24, 40, .16);
    touch-action: none;
    cursor: grab;
}

.mdc-gc__canvas.is-dragging {
    cursor: grabbing;
}

.mdc-gc__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    color: var(--mdc-ink);
    font-weight: 700;
}

.mdc-gc__loading[hidden] {
    display: none;
}

.mdc-gc__hint {
    margin: 12px 0 0;
    color: var(--mdc-muted);
    text-align: center;
    font-size: 13px;
}

.mdc-gc__controls {
    padding: 24px;
    border-left: 1px solid var(--mdc-line);
    background: #fff;
}

.mdc-gc__step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 14px;
}

.mdc-gc__step--spacing {
    margin-top: 26px;
}

.mdc-gc__step > span {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--mdc-primary);
    color: #fff;
    font-weight: 800;
}

.mdc-gc__step strong,
.mdc-gc__step small {
    display: block;
}

.mdc-gc__step strong {
    color: var(--mdc-ink);
    font-size: 16px;
}

.mdc-gc__step small {
    margin-top: 3px;
    color: var(--mdc-muted);
    font-size: 12px;
    line-height: 1.45;
}

.mdc-gc__upload {
    display: grid;
    min-height: 92px;
    place-items: center;
    margin-bottom: 6px;
    padding: 18px;
    border: 2px dashed var(--mdc-secondary);
    border-radius: 7px;
    background: var(--mdc-soft);
    color: var(--mdc-primary);
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.mdc-gc__upload:hover {
    border-color: var(--mdc-primary);
}

.mdc-gc__file {
    position: absolute !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.mdc-gc__filename {
    min-height: 20px;
    margin: 0 0 20px;
    color: var(--mdc-muted);
    font-size: 12px;
    word-break: break-word;
}

.mdc-gc__field-label {
    display: block;
    margin: 12px 0 6px;
    color: var(--mdc-ink);
    font-size: 13px;
    font-weight: 700;
}

.mdc-gc__name,
.mdc-gc__blood-type {
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 9px 11px !important;
    border: 1px solid #cdd5df !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: var(--mdc-ink) !important;
    font: inherit !important;
    box-shadow: none !important;
}

.mdc-gc__name:focus,
.mdc-gc__blood-type:focus {
    border-color: var(--mdc-primary) !important;
    outline: 2px solid rgba(24, 56, 136, .15) !important;
    outline-offset: 1px;
}

.mdc-gc__range-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    color: var(--mdc-ink);
    font-size: 14px;
    font-weight: 700;
}

.mdc-gc__measurement {
    color: var(--mdc-primary);
    font-variant-numeric: tabular-nums;
}

.mdc-gc__scale {
    width: 100%;
    margin: 14px 0 16px;
    accent-color: var(--mdc-primary);
}

.mdc-gc__reset:disabled,
.mdc-gc__save:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.mdc-gc__notice {
    min-height: 40px;
    margin-top: 20px;
    padding: 10px 12px;
    border-radius: 4px;
    color: var(--mdc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.mdc-gc__notice:empty {
    min-height: 0;
    padding: 0;
}

.mdc-gc__notice.is-error {
    background: #fff1f0;
    color: #9f1c13;
}

.mdc-gc__notice.is-success {
    background: #ecf8f1;
    color: #135c39;
}

.mdc-gc__notice.is-info {
    background: #eef3fb;
    color: #243c78;
}

.mdc-gc__cancel {
    min-height: 44px;
    padding: 0 16px;
}

.mdc-gc__save {
    min-height: 44px;
    padding: 10px 22px !important;
    border-radius: 4px !important;
    background: var(--mdc-primary) !important;
    border-color: var(--mdc-primary) !important;
    color: #fff !important;
    font-weight: 800 !important;
}

html.mdc-gc-modal-open,
html.mdc-gc-modal-open body,
body.mdc-gc-modal-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

@media (max-width: 900px) {
    .mdc-gc__modal {
        padding: 0;
    }

    .mdc-gc__dialog {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .mdc-gc__body {
        grid-template-columns: 1fr;
    }

    .mdc-gc__stage-panel {
        padding: 14px;
    }

    .mdc-gc__canvas {
        max-height: 50vh;
    }

    .mdc-gc__controls {
        padding: 20px;
        border-top: 1px solid var(--mdc-line);
        border-left: 0;
    }

    .mdc-gc__header,
    .mdc-gc__footer {
        padding: 13px 16px;
    }

    .mdc-gc__footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
    }
}

@media (max-width: 480px) {
    .mdc-gc__header h2 {
        font-size: 18px;
    }

    .mdc-gc__close {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .mdc-gc__stage-panel {
        padding: 10px;
    }

    .mdc-gc__hint {
        margin-top: 8px;
    }

    .mdc-gc__controls {
        padding: 16px;
    }

    .mdc-gc__footer {
        gap: 8px;
    }

    .mdc-gc__save {
        flex: 1;
    }
}

/* v0.4.0: multiple locations, customer colors and free positioning. */
.mdc-gc__view-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    width: min(100%, 820px);
    margin: 0 auto 14px;
}

.mdc-gc__view-tab {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--mdc-line);
    border-radius: 8px;
    background: #fff;
    color: var(--mdc-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.mdc-gc__view-tab:hover,
.mdc-gc__view-tab:focus-visible {
    border-color: var(--mdc-secondary);
    box-shadow: 0 3px 12px rgba(24, 56, 136, .12);
}

.mdc-gc__view-tab.is-active {
    border-color: var(--mdc-primary);
    box-shadow: 0 0 0 2px rgba(24, 56, 136, .13);
}

.mdc-gc__view-tab.has-patch small {
    color: #176b4d;
}

.mdc-gc__view-tab img {
    grid-row: 1 / 3;
    width: 54px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    background: #eef1f5;
}

.mdc-gc__view-tab span,
.mdc-gc__view-tab small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mdc-gc__view-tab span {
    align-self: end;
    font-size: 13px;
    font-weight: 800;
}

.mdc-gc__view-tab small {
    align-self: start;
    color: var(--mdc-muted);
    font-size: 11px;
}

.mdc-gc__location-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 12px;
    border: 1px solid var(--mdc-line);
    border-radius: 7px;
    background: var(--mdc-soft);
    color: var(--mdc-ink);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.mdc-gc__area-enabled {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.mdc-gc__toggle-track {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #aeb7c5;
    transition: background .15s ease;
}

.mdc-gc__toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
    transition: transform .15s ease;
}

.mdc-gc__area-enabled:checked + .mdc-gc__toggle-track {
    background: var(--mdc-primary);
}

.mdc-gc__area-enabled:checked + .mdc-gc__toggle-track::after {
    transform: translateX(18px);
}

.mdc-gc__area-enabled:focus-visible + .mdc-gc__toggle-track {
    outline: 3px solid rgba(24, 56, 136, .18);
    outline-offset: 2px;
}

.mdc-gc__upload small {
    display: block;
    margin-top: 4px;
    color: var(--mdc-muted);
    font-size: 11px;
    font-weight: 500;
}

.mdc-gc__color-section[hidden] {
    display: none !important;
}

.mdc-gc__color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mdc-gc__color-grid label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--mdc-line);
    border-radius: 6px;
    background: #fff;
    color: var(--mdc-ink);
    font-size: 12px;
    font-weight: 700;
}

.mdc-gc__color-grid input[type="color"] {
    flex: 0 0 42px;
    width: 42px;
    height: 34px;
    padding: 2px;
    border: 1px solid #cdd5df;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.mdc-gc__selected-count {
    margin-right: auto;
    color: var(--mdc-muted);
    font-size: 13px;
    font-weight: 700;
}

.mdc-gc__view-tab:disabled,
.mdc-gc__location-toggle:has(.mdc-gc__area-enabled:disabled) {
    opacity: .6;
    cursor: wait;
}

@media (max-width: 900px) {
    .mdc-gc__view-tabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .mdc-gc__view-tab {
        flex: 0 0 180px;
        scroll-snap-align: start;
    }

    .mdc-gc__selected-count {
        display: none;
    }
}

@media (max-width: 480px) {
    .mdc-gc__view-tab {
        flex-basis: 155px;
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .mdc-gc__view-tab img {
        width: 46px;
        height: 42px;
    }

    .mdc-gc__color-grid {
        grid-template-columns: 1fr;
    }
}

/* v0.5.0: the patch is part of the product photograph; only its content is rendered. */
.mdc-gc__view-tab.needs-content small {
    color: #9a6700;
}

.mdc-gc__location-fields {
    transition: opacity .15s ease;
}

.mdc-gc__location-fields.is-disabled {
    opacity: .5;
}

.mdc-gc__file-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 16px;
}

.mdc-gc__file-row .mdc-gc__filename {
    min-height: 0;
    margin: 0;
}

.mdc-gc__remove-logo {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9f1c13;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.mdc-gc__single-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 10px 12px;
    border: 1px solid var(--mdc-line);
    border-radius: 6px;
    color: var(--mdc-ink);
    font-size: 12px;
    font-weight: 700;
}

.mdc-gc__single-color input[type="color"] {
    flex: 0 0 46px;
    width: 46px;
    height: 36px;
    padding: 2px;
    border: 1px solid #cdd5df;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.mdc-gc__patch-size {
    margin: -6px 0 14px;
    color: var(--mdc-muted);
    font-size: 12px;
}

/* Explicit range styling prevents Divi/browser styles from hiding the track. */
.mdc-gc__scale {
    display: block !important;
    width: 100% !important;
    height: 28px !important;
    margin: 10px 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.mdc-gc__scale::-webkit-slider-runnable-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mdc-primary), var(--mdc-secondary));
    box-shadow: inset 0 0 0 1px rgba(16, 41, 104, .12);
}

.mdc-gc__scale::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -7.5px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--mdc-primary);
    box-shadow: 0 1px 5px rgba(16, 41, 104, .45);
    appearance: none;
    -webkit-appearance: none;
}

.mdc-gc__scale::-moz-range-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mdc-primary), var(--mdc-secondary));
    box-shadow: inset 0 0 0 1px rgba(16, 41, 104, .12);
}

.mdc-gc__scale::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--mdc-primary);
    box-shadow: 0 1px 5px rgba(16, 41, 104, .45);
}

.mdc-gc__scale:focus-visible {
    outline: 3px solid rgba(24, 56, 136, .18) !important;
    outline-offset: 3px;
}

.mdc-gc__scale:disabled {
    opacity: .45;
    cursor: not-allowed;
}


/* v0.6: full-width and perspective controls. */
.mdc-gc__full-width {
    width: 100%;
    margin: 8px 0 14px;
    padding: 10px 12px;
    border: 1px solid #183888;
    border-radius: 6px;
    background: #fff;
    color: #183888;
    font-weight: 700;
    cursor: pointer;
}
.mdc-gc__full-width:hover,
.mdc-gc__full-width:focus-visible {
    background: #eef3ff;
}
.mdc-gc__full-width:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.mdc-gc__range-label--rotation {
    margin-top: 4px;
}
.mdc-gc__rotation-output {
    color: #183888;
    font-weight: 800;
}
.mdc-gc__rotation {
    width: 100%;
    accent-color: #183888;
}


/* v0.7.0: compact WooCommerce product block. */
@media (max-width: 480px) {
    .mdc-gc__open {
        grid-template-columns: 42px minmax(0, 1fr) 16px;
        min-height: 64px;
        padding: 9px 11px !important;
    }

    .mdc-gc__spool-icon {
        width: 40px;
        height: 40px;
    }

    .mdc-gc__spool-icon svg {
        width: 28px;
        height: 28px;
    }

    .mdc-gc__open-title {
        font-size: 15px;
    }

    .mdc-gc__open-subtitle {
        font-size: 11px;
    }
}
