/* ==========================================================================
   Captcha Component Styles
   ========================================================================== */

/* Captcha Row - Contains captcha + submit button */
.captcha-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.captcha-box {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--main-color-one);
    padding: 6px 12px;
    min-width: 110px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.captcha-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(-5deg);
}

.captcha-box::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    transform: rotate(3deg);
}

.captcha-question {
    font-size: 16px;
    font-weight: 700;
    color: var(--main-color-one);
    letter-spacing: 2px;
    user-select: none;
    position: relative;
    z-index: 1;
    direction: ltr;
}

.captcha-input-wrapper {
    width: 80px;
    flex-shrink: 0;
}

.captcha-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    direction: ltr;
}

.captcha-input:focus {
    outline: none;
    border-color: var(--main-color-two);
    box-shadow: 0 0 0 3px var(--main-color-two-shadow);
}

.captcha-input.is-invalid {
    border-color: var(--main-color-red);
    box-shadow: 0 0 0 3px rgba(232, 14, 14, 0.15);
}

.captcha-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--main-color-one);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: var(--main-color-one-hover);
    transform: rotate(180deg);
}

.captcha-refresh:active {
    transform: rotate(180deg) scale(0.95);
}

.captcha-refresh i {
    font-size: 16px;
}

.captcha-refresh.loading i {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Submit Button in Captcha Row */
.captcha-row .btn-flat {
    flex-shrink: 0;
}

/* Honeypot - Hidden from users */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .captcha-row {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
    }
    
    .captcha-wrapper {
        justify-content: flex-end;
    }
    
    .captcha-row .btn-flat {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .captcha-wrapper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .captcha-input-wrapper {
        width: 70px;
    }
    
    .captcha-box {
        min-width: 100px;
        padding: 5px 10px;
    }
    
    .captcha-question {
        font-size: 14px;
    }
}

