/* =========================================
   Captcha Row
========================================= */

.gold-auth-captcha-row {
    width: 100%;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        165px;

    align-items: start;

    gap: 9px;
}

.gold-auth-captcha-input {
    min-width: 0;
}

/* =========================================
   Captcha Box
========================================= */

.gold-auth-captcha-box {
    width: 100%;
    height: 50px;

    display: flex;
    align-items: center;

    gap: 4px;

    overflow: hidden;

    padding: 4px;

    background: #fafaf8;

    border: 1px solid #ebe9e2;
    border-radius: 14px;
}

.gold-auth-captcha-box img {
    min-width: 0;
    height: 100%;

    flex: 1;

    display: block;

    border-radius: 10px;

    object-fit: contain;
    object-position: center;

    transition: opacity 0.2s ease;
}

.gold-auth-captcha-box:has(.gold-auth-captcha-refresh.is-loading) img {
    opacity: 0.45;
}

/* =========================================
   Captcha Refresh
========================================= */

.gold-auth-captcha-refresh {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #1d1b15;

    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-second-color)
    );

    border: 0;
    border-radius: 10px;

    outline: 0;

    cursor: pointer;

    box-shadow: 0 4px 12px
        color-mix(in srgb, var(--primary-color) 15%, transparent);

    transition:
        opacity 0.2s ease,
        box-shadow 0.2s ease;
}

.gold-auth-captcha-refresh:hover,
.gold-auth-captcha-refresh:focus,
.gold-auth-captcha-refresh:active {
    color: #1d1b15;

    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-second-color)
    );

    border: 0;
    outline: 0;

    opacity: 0.9;
}

.gold-auth-captcha-refresh i {
    font-size: 18px;

    line-height: 1;
}

.gold-auth-captcha-refresh.is-loading i {
    animation: gold-auth-captcha-spin 0.65s linear infinite;
}

.gold-auth-captcha-refresh:disabled,
.gold-auth-captcha-refresh.is-loading {
    cursor: not-allowed;

    opacity: 0.65;

    pointer-events: none;
}

/* =========================================
   Animation
========================================= */

@keyframes gold-auth-captcha-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 767.98px) {
    .gold-auth-captcha-row {
        grid-template-columns:
            minmax(0, 1fr)
            158px;

        gap: 8px;
    }
}

/* =========================================
   Small Mobile
========================================= */

@media (max-width: 390px) {
    .gold-auth-captcha-row {
        grid-template-columns:
            minmax(0, 1fr)
            148px;

        gap: 7px;
    }

    .gold-auth-captcha-refresh {
        width: 32px;
        height: 32px;

        flex-basis: 32px;
    }
}
