/**
 * Contact Form Security Styles
 * Visual feedback for spam protection features
 */

/* Form validation styles */
.form-control.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-control.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Error message styles */
.field-error {
    color: #dc3545;
    font-size: 12px;
    display: block;
    margin-top: 5px;
    font-weight: 500;
}

.form-error {
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Success message styles */
.form-success {
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Loading state for submit button */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Rate limiting feedback */
.rate-limit-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 13px;
}

/* Honeypot fields - extra security */
input[name="_honey"],
input[name="website"] {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Form security indicator */
.security-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #28a745;
    margin-top: 10px;
}

.security-indicator::before {
    content: "🔒";
    margin-right: 5px;
}

/* Character counter for text fields */
.char-counter {
    font-size: 11px;
    color: #6c757d;
    text-align: right;
    margin-top: 3px;
}

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

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

/* Form validation progress */
.validation-progress {
    height: 3px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.validation-progress-bar {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Accessibility improvements */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .form-error,
    .form-success {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .field-error {
        font-size: 11px;
    }
    
    .char-counter {
        font-size: 10px;
    }
}

/* Focus states for better accessibility */
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Smooth transitions */
.form-control,
.btn {
    transition: all 0.2s ease-in-out;
}

/* Security badge */
.security-badge {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

/* Form container enhancements */
.contact-form {
    position: relative;
}

.contact-form::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #007bff, #28a745);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form:hover::before {
    opacity: 0.1;
}


