.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 9999; /* Установите z-index, чтобы окно было поверх остального содержимого */
    display: none; /* Начальное состояние - скрыто */
}

/* Turnstile Widget Styles */
.turnstile-container {
    margin: 15px 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 65px;
}

/* Turnstile widget positioning */
.turnstile-container > div {
    border-radius: 4px;
    overflow: hidden;
}

/* Form submit button states */
input[type="submit"].disabled,
button[type="submit"].disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc !important;
    color: #666666 !important;
}

/* Turnstile integration with existing form styles */
.ajax-form.turnstile-form {
    position: relative;
}

/* Turnstile widget in modal forms */
.fw .formcontainer .turnstile-container {
    margin: 10px 0;
    padding: 5px 0;
}

/* Turnstile widget with yellow input fields */
.inputYellow + .turnstile-container,
.inputYellow ~ .turnstile-container {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 10px;
}

/* Turnstile widget with blue input fields */
.inputBlue + .turnstile-container,
.inputBlue ~ .turnstile-container {
    border-top: 1px solid #d0e3f7;
    padding-top: 10px;
    margin-top: 10px;
}

/* Responsive Turnstile widget */
@media (max-width: 768px) {
    .turnstile-container {
        justify-content: center;
        margin: 10px 0;
    }
    
    .turnstile-container > div {
        max-width: 100%;
        overflow: hidden;
    }
}

/* Turnstile loading state */
.turnstile-container.loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Turnstile error state */
.turnstile-container.error {
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 10px;
    background-color: #ffeaea;
    margin: 10px 0;
}

.turnstile-container.error::after {
    content: "Verification failed. Please try again.";
    color: #e74c3c;
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

/* Turnstile success state */
.turnstile-container.success {
    border: 1px solid #27ae60;
    border-radius: 4px;
    padding: 10px;
    background-color: #eafaf1;
    margin: 10px 0;
}

.turnstile-container.success::after {
    content: "✓ Verification successful";
    color: #27ae60;
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

/* Form submission feedback */
.form-feedback {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.form-feedback.error {
    background-color: #ffeaea;
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.form-feedback.success {
    background-color: #eafaf1;
    border: 1px solid #27ae60;
    color: #27ae60;
}

/* Ensure Turnstile widget doesn't interfere with existing form layouts */
.turnstile-container {
    clear: both;
    width: 100%;
}

/* Integration with existing form field styles */
.form .fields .turnstile-container {
    margin: 15px 0;
    width: 100%;
}

/* Modal form specific styles */
.fw .formcontainer form .turnstile-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 10px;
    margin: 15px 0;
}

/* Turnstile error message styling */
.turnstile-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}