/* CF7 Image CAPTCHA – Front-end styles */

/* Container */
.cf7ic-captcha-wrap {
    display: block;
}

.cf7ic-captcha-box {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
    width: 100%;
	padding: 0px 15px;
}

/* Image + refresh row */
.cf7ic-image-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf7ic-captcha-img {
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    display: block;
    user-select: none;
    max-width: 100%;
    height: auto;
    background: #f9fafb;
    transition: opacity 0.2s ease;
}

.cf7ic-captcha-img.cf7ic-loading {
    opacity: 0.4;
}

/* Refresh button */
.cf7ic-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 2px solid #d0d5dd;
    background: #ffffff;
    color: #667085;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.cf7ic-refresh-btn:hover {
    background: #f2f4f7;
    border-color: #98a2b3;
    color: #344054;
}

.cf7ic-refresh-btn:active {
    transform: rotate(180deg);
}

.cf7ic-refresh-btn.cf7ic-spinning svg {
    animation: cf7ic-spin 0.5s linear;
}

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

/* Label */
.cf7ic-label {
    font-size: 13px;
    font-weight: 600;
    color: #344054;
    letter-spacing: 0.01em;
}

/* Input */
.cf7ic-captcha-input {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 18px !important;
    letter-spacing: 6px !important;
    text-transform: uppercase;
    border: 2px solid #d0d5dd !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    width: 100% !important;
    max-width: 220px !important;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #ffffff !important;
    color: #101828 !important;
}

.cf7ic-captcha-input:focus {
    outline: none !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* Error state */
.wpcf7-not-valid .cf7ic-captcha-input,
.cf7ic-captcha-input.wpcf7-not-valid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.wpcf7-not-valid-tip {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

/* Refresh error message */
.cf7ic-refresh-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}
