/* ================================================
   DOAI Math CAPTCHA Widget Styles
   ================================================ */
.captcha-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eef9 100%);
    border: 1px solid #d0daf5;
    border-radius: 10px;
}

.captcha-wrapper .captcha-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.captcha-wrapper .captcha-title span.required {
    color: #e74c3c;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.captcha-question {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid #ccd5e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    min-width: 150px;
}

.captcha-question .math-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f3460;
    letter-spacing: 2px;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
}

.captcha-refresh {
    width: 36px;
    height: 36px;
    background: #0f3460;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.3s;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: #1a1a2e;
}

.captcha-refresh.spinning {
    transform: rotate(360deg);
}

.captcha-input-wrap {
    flex: 1;
    min-width: 140px;
}

.captcha-input-wrap input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ccd5e0;
    border-radius: 8px;
    font-size: 1.1rem;
    letter-spacing: 2px;
    font-weight: 600;
    color: #1a1a2e;
    transition: border-color 0.2s;
    background: #fff;
}

.captcha-input-wrap input::placeholder {
    letter-spacing: 0.5px;
    font-weight: 400;
    color: #aab;
}

.captcha-input-wrap input:focus {
    outline: none;
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.08);
}

.captcha-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #888;
}

/* Responsive */
@media (max-width: 520px) {
    .captcha-box {
        flex-direction: column;
        align-items: stretch;
    }
    .captcha-question {
        justify-content: center;
    }
}
