.otp-box-field {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 54px;
    margin: 8px auto 12px;
}

.otp-box-field .otp-box-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    height: 100%;
    pointer-events: none;
}

.otp-box-field .otp-box-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: 1px solid rgba(101, 22, 36, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--maroon-700, #7a1f2f);
    font: 700 1.35rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.otp-box-field input[data-otp-boxes] {
    position: absolute;
    inset: 0;
    z-index: 1;
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: text;
    font-size: 16px;
}

.otp-box-field .otp-box-cell.is-current {
    border-color: var(--maroon-700, #7a1f2f);
    box-shadow: 0 0 0 2px rgba(122, 31, 47, 0.14);
}

.otp-box-field .otp-box-cell.is-current:empty::after {
    content: "";
    width: 2px;
    height: 22px;
    background: currentColor;
}

.otp-box-field .otp-box-cell.is-selected {
    border-color: var(--maroon-700, #7a1f2f);
    background: #f4e6ea;
}

.otp-box-field.is-invalid .otp-box-cell {
    border-color: #b42318;
}

@media (max-width: 360px) {
    .otp-box-field .otp-box-grid {
        gap: 6px;
    }
}

@media (forced-colors: active) {
    .otp-box-field .otp-box-cell.is-current,
    .otp-box-field .otp-box-cell.is-selected {
        border-color: Highlight;
        outline: 2px solid Highlight;
        outline-offset: -2px;
    }
}
