.bx365-captcha {
    position: relative;
    display: inline-block;
    width: 180px;
    height: 50px;
    overflow: hidden;
    vertical-align: middle;
    border: 1px solid;
    line-height: 0;
}

.bx365-captcha-source,
[bx365-captcha-source] {
    display: none !important;
}

.bx365-captcha__canvas {
    display: block;
    width: 180px;
    height: 50px;
}

.bx365-captcha__overlay,
.bx365-captcha__placeholder,
.bx365-captcha__error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
    line-height: normal;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bx365-captcha__overlay {
    opacity: 0;
    visibility: hidden;
}

.bx365-captcha:not(:hover) .bx365-captcha__overlay {
    opacity: 0 !important;
    visibility: hidden !important;
}

.bx365-captcha__placeholder {
    opacity: 1;
    visibility: visible;
    color: #555;
    font-size: 12px;
    padding: 8px 14px;
    text-align: center;
}

.bx365-captcha__error {
    display: none;
    padding: 8px 14px;
    box-sizing: border-box;
    color: #c62828;
    font-size: 12px;
    text-align: center;
}

.bx365-captcha:hover .bx365-captcha__overlay {
    opacity: 1;
    visibility: visible;
}

.bx365-captcha:hover .bx365-captcha__placeholder {
    opacity: 0;
    visibility: hidden;
}

.bx365-captcha__refresh {
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bx365-captcha:not(:hover) .bx365-captcha__refresh {
    opacity: 0 !important;
    pointer-events: none !important;
}

.bx365-captcha:hover .bx365-captcha__refresh {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.bx365-captcha__refresh:hover {
    color: #fff;
}

.bx365-captcha__refresh-icon {
    display: block;
    background-color: currentColor;
    mask: url('/bitrix/images/bx365.captcha/refresh.svg') center / contain no-repeat;
    -webkit-mask: url('/bitrix/images/bx365.captcha/refresh.svg') center / contain no-repeat;
}

.bx365-captcha__progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    display: none;
}
