/* BoAnalyst CAPTCHA Styles */
/* Matches the existing design system */

.captcha-container {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.captcha-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--boanalyst-gold), transparent);
    opacity: 0.6;
}

.captcha-container:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(212, 175, 55, 0.2);
}

.captcha-container.error {
    border-color: rgba(220, 53, 69, 0.5);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.captcha-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.captcha-icon {
    font-size: 18px;
    color: var(--boanalyst-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.captcha-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--boanalyst-gold);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.captcha-question {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.math-question {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--boanalyst-text-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.captcha-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 15px 0;
}

.captcha-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: var(--boanalyst-text-light);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.captcha-input:focus {
    outline: none;
    border-color: var(--boanalyst-gold);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(212, 175, 55, 0.2),
        0 0 20px rgba(212, 175, 55, 0.1);
    transform: translateY(-1px);
}

.captcha-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.captcha-refresh {
    padding: 12px;
    background: linear-gradient(135deg, var(--boanalyst-gold) 0%, var(--boanalyst-gold-dark) 100%);
    border: none;
    border-radius: 8px;
    color: var(--boanalyst-black);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-refresh:hover {
    background: linear-gradient(135deg, var(--boanalyst-gold-light) 0%, var(--boanalyst-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.captcha-refresh:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 6px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.captcha-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.attempts-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.captcha-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
}

.error-icon {
    font-size: 18px;
    color: #ff4757;
}

.error-message {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.captcha-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 6px;
    color: #ff6b6b;
    font-size: 13px;
    animation: slideIn 0.3s ease;
}

.captcha-error-message .error-icon {
    font-size: 14px;
}

.captcha-error-message .error-text {
    flex: 1;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .captcha-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .math-question {
        font-size: 20px;
        padding: 8px 16px;
    }
    
    .captcha-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .captcha-refresh {
        padding: 10px;
        min-width: 40px;
    }
    
    .captcha-title {
        font-size: 14px;
    }
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .captcha-container {
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
    }
    
    .captcha-input {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .captcha-container {
        border-width: 2px;
    }
    
    .captcha-input {
        border-width: 2px;
    }
    
    .math-question {
        border-width: 2px;
    }
}

/* Animation for refresh button */
.captcha-refresh.refreshing {
    animation: spin 0.5s ease-in-out;
}

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