/* Codequiry In-House CAPTCHA - Compact Design */

.cq-captcha {
    margin: 0.5rem 0;
}

.cq-captcha-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cq-captcha-box:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.cq-captcha-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

.cq-captcha-image {
    display: block;
    width: 100px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #fff;
}

.cq-captcha-refresh {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0;
}

.cq-captcha-refresh:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    transform: rotate(180deg);
}

.cq-captcha-refresh svg {
    width: 10px;
    height: 10px;
}

.cq-captcha-content {
    flex: 1;
    min-width: 0;
}

.cq-captcha-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

.cq-captcha-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.cq-captcha-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    font-size: 0.75rem;
}

/* Hide the hint by default, show on mobile only if needed */
.cq-captcha-hint {
    display: none;
}

/* Honeypot field - hidden from humans */
.cq-hp-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Dark mode */
.dark .cq-captcha-box {
    background: #1e293b;
    border-color: #334155;
}

.dark .cq-captcha-box:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.dark .cq-captcha-image {
    border-color: #475569;
}

.dark .cq-captcha-refresh {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}

.dark .cq-captcha-refresh:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.dark .cq-captcha-input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

.dark .cq-captcha-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.dark .cq-captcha-input::placeholder {
    color: #64748b;
}

/* Error state */
.cq-captcha-box.error {
    border-color: #ef4444;
}

.cq-captcha-box.error .cq-captcha-input {
    border-color: #ef4444;
}

.dark .cq-captcha-box.error {
    border-color: #f87171;
}

/* Loading animation */
.cq-captcha-refresh.loading svg {
    animation: spin 0.8s linear infinite;
}

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