/* ========================================
   CAPTCHA CSS - SalonBookIt
   Estilos para el captcha y honeypot
   ======================================== */

/* === HONEYPOT (invisible para usuarios) === */
.form-honeypot-wrapper {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === CAPTCHA GROUP === */
.captcha-group {
    margin-top: 8px;
}

/* === CAPTCHA CONTAINER === */
.captcha-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === CAPTCHA IMAGE WRAPPER === */
.captcha-image-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 8px 12px;
}

/* === CAPTCHA IMAGE === */
.captcha-image {
    height: 50px;
    width: auto;
    border-radius: 4px;
    background: white;
}

/* === CAPTCHA REFRESH BUTTON === */
.captcha-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.captcha-refresh:hover svg {
    stroke: var(--navy-900);
}

.captcha-refresh svg {
    width: 20px;
    height: 20px;
    stroke: var(--gray-600);
    transition: stroke 0.2s ease;
}

/* === SPINNING ANIMATION === */
.captcha-refresh.spinning svg {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* === CAPTCHA INPUT === */
.captcha-input {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.captcha-input::placeholder {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* === CAPTCHA HINT === */
.captcha-hint {
    display: block;
    color: var(--gray-500);
}

/* === INPUT ERROR STATE === */
.captcha-input.error,
#captcha_1.error {
    border-color: var(--danger, #dc2626);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .captcha-image-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .captcha-image {
        width: 100%;
        height: auto;
        max-height: 60px;
        object-fit: contain;
    }

    .captcha-refresh {
        width: 100%;
        height: 36px;
    }

    .captcha-input {
        font-size: 16px;
    }
}
