/* Contact Form Styles for ATAKÖY FOUNDATION TÜRKİYE */

/* Error message styles */
.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

/* Form field error state */
.form-control.error {
    border-color: #e74c3c;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 0 3px rgba(231, 76, 60, .1);
}

/* Success/Error message alerts */
#form-messages {
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

#form-messages.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

#form-messages.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#form-messages i {
    margin-right: 8px;
}

/* Loading button styles */
.btn-custom:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading i {
    margin-right: 5px;
}

/* Form validation improvements */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

/* Required field indicator */
.form-control[required] {
    position: relative;
}

/* Focus states */
.form-control:focus {
    border-color: #e74c3c;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 0 3px rgba(231, 76, 60, .1);
}

/* Select dropdown styling */
select.form-control {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 4 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m2 0l2 3h-4z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .contact-form-block {
        margin-bottom: 30px;
    }
    
    #form-messages {
        font-size: 13px;
        padding: 12px 15px;
    }
    
    .error-message {
        font-size: 12px;
    }
}

/* Animation for success messages */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#form-messages.alert-success {
    animation: slideInDown 0.3s ease-out;
}

/* Improved button hover states */
.btn-custom:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    transition: all 0.2s ease;
}

/* Character counter for textarea (optional feature) */
.char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.error {
    color: #e74c3c;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
    animation: spin 1s infinite linear;
}

/* Accessibility improvements */
.form-control:focus,
.btn-custom:focus {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .error-message {
        color: #d63031;
        font-weight: bold;
    }
    
    .form-control.error {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #form-messages.alert-success {
        animation: none;
    }
    
    .btn-custom:hover:not(:disabled) {
        transition: none;
        transform: none;
    }
}
