

.my-captcha {
    --my-captcha__bg: #222;
    --my-captcha__fg: #fff;
    --my-captcha__border-color: #484848;
    --my-captcha__border-width: 2px;

    --my-captcha__button-bg: #fcfcfc;
    --my-captcha__button-bg-hover: #efefef;
    --my-captcha__button-border-color: #c3c3c3;
    --my-captcha__button-border-color-hover: #b6b6b6;
    --my-captcha__button-border-width: 2px;
}

.my-captcha.light {
    --my-captcha__bg: #f9f9f9;
    --my-captcha__fg: #000;
    --my-captcha__border-color: #d3d3d3;
    --my-captcha__border-width: 2px;

    --my-captcha__button-bg: #fcfcfc;
    --my-captcha__button-bg-hover: #efefef;
    --my-captcha__button-border-color: #c3c3c3;
    --my-captcha__button-border-color-hover: #b6b6b6;
    --my-captcha__button-border-width: 2px;
}
.my-captcha.dark {
    --my-captcha__bg: #222;
    --my-captcha__fg: #fff;
    --my-captcha__border-color: #484848;
    --my-captcha__border-width: 2px;

    --my-captcha__button-bg: #fcfcfc;
    --my-captcha__button-bg-hover: #efefef;
    --my-captcha__button-border-color: #c3c3c3;
    --my-captcha__button-border-color-hover: #b6b6b6;
    --my-captcha__button-border-width: 2px;
}

.my-captcha {
    display: inline-grid;
    grid-template-columns: auto 1fr auto;
    position: relative;
    min-height: 70px;

    color: var(--my-captcha__fg);
    background: var(--my-captcha__bg);
    border: var(--my-captcha__border-width) solid var(--my-captcha__border-color);
    border-radius: 4px;
    padding: .25em 1em;
    gap: .5em 1em;
    font-weight: normal;
}

.my-captcha__button-box, 
.my-captcha__text-box,
.my-captcha__image-box 
{
    display: grid;
    justify-items: center;
    align-items: center;
}

.my-captcha__button,
.my-captcha__loading,
.my-captcha__success,
.my-captcha__fail,
.my-captcha__input
{
    display: grid;
    justify-items: center;
    align-items: center;
    grid-row: 1;
    grid-column: 1;
}

.my-captcha__button {
    --size: 2.5em;
    width: var(--size);
    height: var(--size);
    cursor: pointer;
    appearance: none;
    background: var(--my-captcha__button-bg);
    border: var(--my-captcha__button-border-width) solid var(--my-captcha__button-border-color);
    border-radius: 4px;
}
.my-captcha__button:hover {
    background: var(--my-captcha__button-bg-hover);
    border-color: var(--my-captcha__button-border-color-hover)
}
.my-captcha__loading {}
.my-captcha__success {}
.my-captcha__fail {}

.my-captcha__image img {max-width: 48px;max-height: 48px;object-fit: contain;}
.my-captcha__image svg {max-width: 48px;max-height: 48px;}

.my-captcha__image-label {
    font-size: .7em;
    opacity: .7;
    line-height: 1;
}

/* Input - pseudo-hidden*/
.my-captcha__input {
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    appearance: none !important;
}


/* Změna stavu */
.my-captcha:not(.ready) .my-captcha__button {visibility: hidden;}
.my-captcha:not(.loading) .my-captcha__loading {visibility: hidden;}
.my-captcha:not(.success) .my-captcha__success {visibility: hidden;}
.my-captcha:not(.fail) .my-captcha__fail {visibility: hidden;}


/* Default */
.my-captcha__default-success {font-size: 2em;}
.my-captcha__default-fail {font-size: 2em;}

.my-captcha__default-loading {position: relative;}
.my-captcha__default-loading::after {
    content: "";
    display: block;
    color: currentColor;
    border: 0.3em solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    width: 1em;
    height: 1em;
    animation: my-captcha__spin 1s infinite;
    animation-timing-function: cubic-bezier(0.75, 0.29, 0.13, 0.63);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
}
@keyframes my-captcha__spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Zpráva o brandu reCAPTCHA a skrytí odznaku */
/* https://developers.google.com/recaptcha/docs/faq */
.my-captcha__reCAPTCHA {
    grid-column: 1 / -1;
    font-size: 9px;
    max-width: 230px;
    text-align: center;
    line-height: 1.2;
}
.grecaptcha-badge {
    display: none;
}