:root {
    --hcrdc-brand: var(--brand-color, #111827);
}

#depositPreview.hcrdc-enhanced .hcrdc-instruction {
    margin: 0 0 14px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--hcrdc-brand);
}

#depositPreview.hcrdc-enhanced .hcrdc-deposit-row {
    margin: 0 0 12px;
    padding: 0;
    border: 1px solid #cfd5df;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#depositPreview.hcrdc-enhanced .hcrdc-deposit-row:hover {
    border-color: var(--hcrdc-brand);
}

#depositPreview.hcrdc-enhanced .hcrdc-deposit-row:has(.hcrdc-deposit-radio:checked) {
    border-color: var(--hcrdc-brand);
    box-shadow: 0 0 0 1px var(--hcrdc-brand);
    background: #f8fafc;
}

#depositPreview.hcrdc-enhanced label.custom-block.hcrdc-deposit-label {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 15px 16px !important;
    padding-inline-start: 16px !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Remove Turbo's original switch artwork from the price spans. */
#depositPreview.hcrdc-enhanced .hcrdc-deposit-label::before,
#depositPreview.hcrdc-enhanced .hcrdc-deposit-label::after,
#depositPreview.hcrdc-enhanced .hcrdc-deposit-label span::before,
#depositPreview.hcrdc-enhanced .hcrdc-deposit-label span::after {
    display: none !important;
    content: none !important;
}

#depositPreview.hcrdc-enhanced .hcrdc-deposit-radio,
.turbo-product-page #depositPreview.hcrdc-enhanced .hcrdc-deposit-radio {
    -webkit-appearance: radio !important;
    appearance: auto !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    float: none !important;
    transform: none !important;
    inset: auto !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: initial !important;
    border-radius: 50% !important;
    background: initial !important;
    box-shadow: none !important;
    outline-offset: 2px !important;
    accent-color: var(--hcrdc-brand) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 3 !important;
}

#depositPreview.hcrdc-enhanced .hcrdc-deposit-label .pull-right {
    float: none !important;
    display: inline-block !important;
    justify-self: end !important;
    white-space: nowrap !important;
    color: var(--hcrdc-brand) !important;
}

#depositPreview.hcrdc-enhanced .hcrdc-deposit-row > p {
    margin: 0 !important;
    padding: 0 16px 14px 48px !important;
    color: #4b5563 !important;
    line-height: 1.55 !important;
}

#depositPreview.hcrdc-enhanced .hcrdc-acknowledgment {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    margin: 16px 0 0 !important;
    padding: 15px 16px !important;
    border: 1px solid #cfd5df !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    line-height: 1.55 !important;
    cursor: pointer !important;
}

#depositPreview.hcrdc-enhanced .hcrdc-acknowledgment input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: auto !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    float: none !important;
    transform: none !important;
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    background: initial !important;
    border: initial !important;
    box-shadow: none !important;
    accent-color: var(--hcrdc-brand) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.hcrdc-error {
    margin: 12px 0;
    padding: 11px 13px;
    border-left: 4px solid #b42318;
    background: #fff1f0;
    color: #8a1c13;
    font-weight: 700;
    line-height: 1.5;
}

.hcrdc-error[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    #depositPreview.hcrdc-enhanced label.custom-block.hcrdc-deposit-label {
        grid-template-columns: 20px minmax(0, 1fr) !important;
    }

    #depositPreview.hcrdc-enhanced .hcrdc-deposit-label .pull-right {
        grid-column: 2 !important;
        justify-self: start !important;
    }

    #depositPreview.hcrdc-enhanced .hcrdc-deposit-row > p {
        padding-left: 48px !important;
    }
}
