/* استایل‌های کپچا */
.captcha-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.captcha-input-wrapper {
    flex: 1;
    display: flex;
    gap: 10px;
    position: relative;
}

.captcha-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.captcha-image {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.1);
}

.captcha-image:hover {
    border-color: var(--secondary-color-1);
    box-shadow: 0 0 0 2px rgba(199, 166, 98, 0.3);
}

.captcha-refresh {
    background: var(--secondary-color-1);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.captcha-refresh:hover {
    background: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.captcha-hint {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
}

.captcha-length-indicator {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 8px;
    border-radius: 10px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.captcha-length-indicator.complete {
    color: var(--secondary-color-1);
    background: rgba(199, 166, 98, 0.2);
}

/* استایل‌های اعتبارسنجی بلادرنگ */
.validation-feedback {
    position: relative;
    min-height: 22px;
    margin-top: 8px;
}

.validation-error {
    color: #ff6b6b;
    font-size: 0.85em;
    text-align: right;
    background: rgba(255, 107, 107, 0.1);
    padding: 5px 10px;
    border-radius: 6px;
    border-right: 3px solid #ff6b6b;
    display: none;
}

.validation-success {
    color: #538266;
    font-size: 0.85em;
    text-align: right;
    background: rgba(83, 130, 102, 0.1);
    padding: 5px 10px;
    border-radius: 6px;
    border-right: 3px solid #538266;
    display: none;
}

.glass-input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.glass-input.success {
    border-color: #538266;
    box-shadow: 0 0 0 2px rgba(83, 130, 102, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

/* استایل‌های فرم پیشرفته */
.char-counter {
    font-size: 0.8em;
    color: var(--secondary-color-1);
    direction: ltr;
    text-align: left;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 8px;
    margin-top: 5px;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 15px;
}

.form-submit-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.form-notice {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.form-notice i {
    color: var(--secondary-color-1);
    font-size: 1.1em;
}

/* انیمیشن‌ها */
@keyframes captchaRefresh {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.captcha-refresh.refreshing i {
    animation: captchaRefresh 0.6s ease;
}

.captcha-image.refreshing {
    opacity: 0.7;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .captcha-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .captcha-input-wrapper {
        order: 2;
    }
    
    .captcha-image-wrapper {
        order: 1;
        align-self: center;
    }
    
    .captcha-length-indicator {
        left: 50%;
        transform: translateX(-50%);
        top: -25px;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .textarea-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .char-counter {
        text-align: center;
        order: 2;
    }
    
    .validation-feedback {
        order: 1;
    }
}

@media (max-width: 480px) {
    .captcha-input-wrapper {
        flex-direction: column;
    }
    
    .captcha-refresh {
        width: 100%;
        max-width: 200px;
        align-self: center;
    }
    
    .captcha-image {
        height: 40px;
    }
    
    .form-notice {
        padding: 12px;
        font-size: 0.85em;
    }
}