.wkr-configurator {
    margin: 1.25rem 0;
    padding: 1.1rem;
    border: 1px solid #d6dbe3;
    border-radius: 10px;
    background: #fcfdff;
}

.wkr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.wkr-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.wkr-toggle-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wkr-toggle-field__label {
    font-size: 0.95rem;
}

.wkr-grid .wkr-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    user-select: none;
    width: fit-content;
    position: relative;
}

.wkr-toggle__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wkr-toggle__track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #9ca3af;
    background: #e5e7eb;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
    order: 2;
}

.wkr-toggle__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.wkr-toggle__input:checked ~ .wkr-toggle__track {
    background: #16a34a;
    border-color: #15803d;
}

.wkr-toggle__input:checked ~ .wkr-toggle__track::after {
    transform: translateX(20px);
}

.wkr-toggle__state {
    font-size: 0.85rem;
    color: #4b5563;
    min-width: 2.1rem;
    text-align: center;
    flex-shrink: 0;
}

.wkr-toggle__state--off {
    order: 1;
    font-weight: 600;
}

.wkr-toggle__state--on {
    order: 3;
}

.wkr-toggle__input:checked ~ .wkr-toggle__state--off {
    font-weight: 400;
    color: #4b5563;
}

.wkr-toggle__input:checked ~ .wkr-toggle__state--on {
    font-weight: 600;
    color: #111827;
}

.wkr-toggle__input:focus + .wkr-toggle__track {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.wkr-dimension-field,
.wkr-dimension-hint {
    grid-column: 1 / -1;
}

.wkr-dimension-hint {
    margin: -0.2rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #4b5563;
}

.wkr-glass-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
}

.wkr-glass-help {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.45rem;
    position: relative;
}

.wkr-glass-help__trigger {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #9ca3af;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.wkr-glass-help__hint {
    font-size: 0.8rem;
    color: #4b5563;
}

.wkr-glass-help__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
    z-index: 80;
}

.wkr-glass-help__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, calc(100vw - 2rem));
    max-height: min(78vh, 680px);
    overflow: auto;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
    padding: 0.75rem;
    z-index: 81;
}

.wkr-glass-help__panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.wkr-glass-help__close {
    border: 1px solid #c7cdd7;
    background: #ffffff;
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.wkr-glass-help__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.55rem;
}

.wkr-glass-help__card {
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fbff;
}

.wkr-glass-help__card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid #dbe1e8;
}

.wkr-glass-help__card h4 {
    margin: 0;
    padding: 0.5rem 0.55rem 0;
    font-size: 0.85rem;
    line-height: 1.25;
}

.wkr-glass-help__card p {
    margin: 0;
    padding: 0.35rem 0.55rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #4b5563;
}

.wkr-ral-palette-wrap {
    margin-bottom: 0.75rem;
}

.wkr-ral-trigger {
    width: 100%;
    border: 1px solid #d4d8df;
    border-radius: 6px;
    background: #fff;
    padding: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    text-align: left;
}

.wkr-ral-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wkr-ral-swatch {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 4px;
    border: 1px solid #8a8f98;
    background: transparent;
    display: block;
    flex: 0 0 18px;
}

.wkr-ral-panel {
    margin-top: 0.6rem;
    border: 1px solid #d4d8df;
    border-radius: 8px;
    padding: 0.65rem;
    background: #fff;
    max-height: 300px;
    overflow: auto;
}

.wkr-ral-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.wkr-ral-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.45rem;
}

.wkr-ral-option {
    border: 1px solid #c9ced6;
    border-radius: 6px;
    background: #fff;
    padding: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-align: left;
    cursor: pointer;
}

.wkr-ral-option__swatch {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 3px;
    border: 1px solid #8a8f98;
    display: block;
    flex: 0 0 16px;
}

.wkr-ral-option__label {
    font-size: 0.82rem;
}

.wkr-ral-option.is-selected {
    border-color: #0d6efd;
    box-shadow: inset 0 0 0 1px #0d6efd;
}

.wkr-ral-option:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wkr-feature-buttons {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.wkr-feature-buttons .button {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.7rem 1rem;
    min-height: 44px;
    min-width: 190px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #bcc6d4;
    background: #ffffff;
}

.wkr-feature-buttons .button:hover,
.wkr-feature-buttons .button:focus {
    border-color: #7a8ba8;
    background: #f4f7fb;
}

.wkr-feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wkr-feature-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: stretch;
    background: #fff;
    position: relative;
}

.wkr-feature-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding-right: 1.8rem;
    flex-wrap: nowrap;
}

.wkr-feature-header strong {
    margin-right: 0.15rem;
}

.wkr-feature-fields {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.wkr-feature-item--cutout {
    border-color: #dc3545;
}

.wkr-feature-item--drill {
    border-color: #0d6efd;
}

.wkr-feature-item--socket_drill {
    border-color: #0d6efd;
}

.wkr-feature-item--socket_drill_double {
    border-color: #0d6efd;
}

.wkr-feature-item--slope {
    border-color: #d39e00;
}

.wkr-feature-item--stripe {
    border-color: #7c3aed;
}

.wkr-feature-price {
    font-size: 0.82rem;
    color: #4b5563;
    padding: 0.1rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    margin-left: auto;
    white-space: nowrap;
}

.wkr-feature-remove {
    position: absolute;
    top: 0.4rem;
    right: 0.45rem;
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.wkr-feature-remove:hover,
.wkr-feature-remove:focus {
    border-color: #9ca3af;
    background: #f9fafb;
}

.wkr-stripe-palette {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.1rem;
}

.wkr-stripe-palette__label {
    font-size: 0.82rem;
    color: #374151;
}

.wkr-stripe-palette__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22px, 1fr));
    gap: 0.25rem;
    max-height: 88px;
    overflow: auto;
    padding-right: 0.15rem;
}

.wkr-stripe-color {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    cursor: pointer;
    padding: 0;
}

.wkr-stripe-color.is-selected {
    box-shadow: 0 0 0 2px #111827 inset;
}

.wkr-field-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
}

.wkr-field-inline > label {
    min-width: 145px;
}

.wkr-field-inline input,
.wkr-field-inline select {
    width: 150px;
}

.wkr-field-hint {
    color: #5f6368;
    font-size: 0.75rem;
    line-height: 1.2;
}

.wkr-preview-wrap {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.wkr-faq {
    margin-bottom: 0.75rem;
    border: 1px solid #d4d8df;
    border-radius: 8px;
    background: #ffffff;
}

.wkr-faq > summary {
    cursor: pointer;
    padding: 0.65rem 0.8rem;
    font-weight: 600;
    color: #1f2937;
}

.wkr-faq__content {
    border-top: 1px solid #e5e7eb;
    padding: 0.65rem 0.8rem;
    background: #f8fbff;
}

.wkr-faq__content p {
    margin: 0 0 0.45rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.wkr-faq__content p:last-child {
    margin-bottom: 0;
}

#wkr-preview {
    width: 100%;
    display: block;
    background: #f8f8f8;
}

.wkr-bottom-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.9rem;
    margin-bottom: 0.5rem;
}

.wkr-actions {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-start;
    justify-content: flex-start;
}

#wkr-download-tech-drawing {
    min-height: 40px;
    min-width: 280px;
    padding: 0.5rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wkr-tech-drawing-note {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--wkr-ink-soft, #374151);
}

.wkr-price-panel {
    flex: 0 0 auto;
    width: 100%;
    border: 1px solid #d6dbe3;
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    background: #ffffff;
}

.wkr-price-title {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    line-height: 1.2;
}

.wkr-preview-base {
    fill: #e9ecef;
    stroke: #8a8f98;
    stroke-width: 2;
}

.wkr-preview-cutout {
    fill: #ffffff;
    stroke: #dc3545;
    stroke-width: 2;
}

.wkr-preview-drill {
    fill: #ffffff;
    stroke: #0d6efd;
    stroke-width: 2;
}

.wkr-preview-slope {
    fill: #ffffff;
    stroke: #d39e00;
    stroke-width: 2;
}

.wkr-preview-stripe {
    stroke: none;
}

.wkr-errors {
    color: #b91c1c;
    margin-bottom: 0.5rem;
}

.wkr-errors ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.wkr-shipping-mode {
    margin: 1rem 0 0.5rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #d6dbe3;
    border-radius: 8px;
    background: #f8fafc;
}

.wkr-shipping-mode__title {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
}

.wkr-shipping-mode__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 0.3rem 0;
}

.wkr-shipping-mode__icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wkr-shipping-mode__icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: #0f172a;
    opacity: 0.9;
}

.wkr-shipping-mode__label {
    flex: 1;
}

.wkr-shipping-mode__cost {
    color: #334155;
    font-weight: 600;
}

.wkr-shipping-mode__option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.wkr-legal-consent {
    margin: 1rem 0 0.85rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #d6dbe3;
    border-radius: 8px;
    background: #fffdf7;
}

.wkr-legal-consent__label {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 0.65rem;
    align-items: start;
    font-size: 0.92rem;
    line-height: 1.45;
    cursor: pointer;
}

.wkr-legal-consent__label input {
    margin-top: 0.2rem;
}

.wkr-price-breakdown {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.wkr-price-breakdown ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.wkr-price-line {
    font-size: 1.1rem;
}

.wkr-logistics-info {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid #d6dbe3;
    font-size: 0.9rem;
    color: #374151;
}

.wkr-logistics-info p {
    margin: 0.15rem 0;
}

/* Tardis brand-aligned visual refresh */
.wkr-configurator {
    --wkr-ink: #151515;
    --wkr-ink-soft: #3f3f46;
    --wkr-line: #d4d4d8;
    --wkr-line-strong: #18181b;
    --wkr-surface: #ffffff;
    --wkr-surface-subtle: #fafafa;
    --wkr-danger: #b91c1c;
    --wkr-info: #1f2937;
    --wkr-focus: #0f172a;

    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid var(--wkr-line-strong);
    border-radius: 2px;
    background: var(--wkr-surface);
    color: var(--wkr-ink);
}

.wkr-configurator h3,
.wkr-configurator h4 {
    margin: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--wkr-ink);
}

.wkr-grid {
    gap: 0.9rem;
}

.wkr-grid label {
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    color: var(--wkr-ink-soft);
}

.wkr-glass-help__trigger,
.wkr-glass-help__close {
    border-radius: 0;
    border-color: var(--wkr-line-strong);
    color: var(--wkr-ink);
}

.wkr-glass-help__hint {
    color: var(--wkr-ink-soft);
}

.wkr-glass-help__panel {
    border-radius: 0;
    border-color: var(--wkr-line-strong);
    box-shadow: 6px 6px 0 rgba(24, 24, 27, 0.08);
}

.wkr-glass-help__backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.wkr-glass-help__card {
    border-radius: 0;
    border-color: var(--wkr-line);
    background: var(--wkr-surface-subtle);
}

.wkr-glass-help__card img {
    border-bottom-color: var(--wkr-line);
}

.wkr-configurator input[type="number"],
.wkr-configurator select {
    border: 1px solid var(--wkr-line);
    border-radius: 0;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    background: var(--wkr-surface);
    color: var(--wkr-ink);
}

.wkr-configurator input[type="number"]:focus,
.wkr-configurator select:focus,
.wkr-configurator button:focus {
    outline: 2px solid var(--wkr-focus);
    outline-offset: 2px;
}

.wkr-ral-trigger,
.wkr-ral-panel,
.wkr-ral-option,
.wkr-price-panel,
.wkr-preview-wrap,
.wkr-feature-item,
.wkr-feature-remove {
    border-radius: 0;
}

.wkr-ral-trigger {
    border-color: var(--wkr-line-strong);
    background: var(--wkr-surface);
    min-height: 44px;
}

.wkr-ral-trigger:hover,
.wkr-ral-trigger:focus {
    background: var(--wkr-surface-subtle);
}

.wkr-ral-panel {
    border-color: var(--wkr-line-strong);
    background: var(--wkr-surface);
}

.wkr-ral-option {
    border-color: var(--wkr-line);
    min-height: 34px;
}

.wkr-ral-option:hover,
.wkr-ral-option:focus {
    border-color: var(--wkr-line-strong);
    background: var(--wkr-surface-subtle);
}

.wkr-ral-option.is-selected {
    border-color: var(--wkr-line-strong);
    box-shadow: inset 0 0 0 1px var(--wkr-line-strong);
}

.wkr-feature-buttons {
    border-top: 1px solid var(--wkr-line);
    border-bottom: 1px solid var(--wkr-line);
    padding: 0.75rem 0;
}

.wkr-feature-buttons .button,
#wkr-download-tech-drawing {
    border: 1px solid var(--wkr-line-strong);
    border-radius: 0;
    background: var(--wkr-line-strong);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wkr-feature-buttons .button:hover,
.wkr-feature-buttons .button:focus,
#wkr-download-tech-drawing:hover,
#wkr-download-tech-drawing:focus {
    background: var(--wkr-surface);
    color: var(--wkr-line-strong);
    border-color: var(--wkr-line-strong);
}

.wkr-feature-item {
    border-color: var(--wkr-line);
    background: var(--wkr-surface);
    padding: 0.8rem;
}

.wkr-feature-item--cutout,
.wkr-feature-item--drill,
.wkr-feature-item--socket_drill,
.wkr-feature-item--socket_drill_double,
.wkr-feature-item--slope,
.wkr-feature-item--stripe {
    border-left-width: 4px;
}

.wkr-feature-item--cutout {
    border-left-color: #991b1b;
}

.wkr-feature-item--drill {
    border-left-color: #111827;
}

.wkr-feature-item--socket_drill {
    border-left-color: #1d4ed8;
}

.wkr-feature-item--socket_drill_double {
    border-left-color: #1e40af;
}

.wkr-feature-item--slope {
    border-left-color: #57534e;
}

.wkr-feature-item--stripe {
    border-left-color: #27272a;
}

.wkr-feature-header {
    align-items: center;
}

.wkr-feature-price {
    border-color: var(--wkr-line);
    border-radius: 999px;
    color: var(--wkr-ink-soft);
    background: var(--wkr-surface-subtle);
}

.wkr-feature-remove {
    border-color: var(--wkr-line);
    color: var(--wkr-ink);
    background: var(--wkr-surface);
}

.wkr-feature-remove:hover,
.wkr-feature-remove:focus {
    border-color: var(--wkr-line-strong);
    background: var(--wkr-surface-subtle);
}

#wkr-preview {
    background: #f4f4f5;
}

.wkr-preview-base {
    fill: #ececec;
    stroke: #1f2937;
}

.wkr-preview-cutout,
.wkr-preview-drill,
.wkr-preview-slope {
    stroke-width: 2;
}

.wkr-preview-cutout {
    stroke: #991b1b;
}

.wkr-preview-drill,
.wkr-preview-slope {
    stroke: #111827;
}

.wkr-errors {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: var(--wkr-danger);
    padding: 0.55rem 0.7rem;
}

.wkr-price-panel {
    border-color: var(--wkr-line-strong);
    background: var(--wkr-surface-subtle);
}

.wkr-price-title {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.86rem;
    color: var(--wkr-ink-soft);
}

.wkr-price-line {
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--wkr-ink);
}

@media (max-width: 900px) {
    .wkr-grid {
        grid-template-columns: 1fr;
    }

    .wkr-bottom-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wkr-actions,
    #wkr-download-tech-drawing,
    .wkr-price-panel {
        width: 100%;
    }

    #wkr-download-tech-drawing {
        min-width: 0;
    }

    .wkr-glass-help__panel {
        width: calc(100vw - 1rem);
        max-height: 80vh;
        padding: 0.55rem;
    }
}
