/* ht-cf7-image-captcha – Frontend Styles */

.ht-captcha-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-width: 280px;
}

.ht-captcha-label {
    font-size: 0.875em;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

.ht-captcha-image-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ht-captcha-img {
    display: block;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    width: 160px;
    height: 50px;
    object-fit: cover;
    transition: opacity 0.25s ease;
    user-select: none;
}

.ht-captcha-img.ht-loading {
    opacity: 0.45;
}

.ht-captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 8px;
    color: #6b7280;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s, transform 0.35s ease;
}

.ht-captcha-refresh:hover {
    color: #111827;
    border-color: #9ca3af;
}

.ht-captcha-refresh.ht-spinning svg {
    animation: ht-spin 0.55s linear;
}

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

.ht-captcha-input {
    width: 100%;
    max-width: 160px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1em;
    letter-spacing: 0.12em;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ht-captcha-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Error state (added by JS / CF7) */
.ht-captcha-input.wpcf7-not-valid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Dark-mode support */
@media (prefers-color-scheme: dark) {
    .ht-captcha-label   { color: #e5e7eb; }
    .ht-captcha-img     { border-color: #374151; background: #1f2937; }
    .ht-captcha-input   { background: #1f2937; color: #f9fafb; border-color: #374151; }
    .ht-captcha-refresh { border-color: #374151; color: #9ca3af; }
    .ht-captcha-refresh:hover { color: #f9fafb; border-color: #6b7280; }
}
