/* Contact Form Error States */
.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: "⚠";
    font-size: 1rem;
}

/* Loading State */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary:disabled:hover {
    transform: none !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 320px;
    max-width: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    transform: translateX(100%);
    transition: all 0.3s ease;
    opacity: 0;
}

.notification--show {
    transform: translateX(0);
    opacity: 1;
}

.notification--success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.notification--error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.notification--info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.notification__content {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.notification__content i:first-child {
    font-size: 1.25rem;
}

.notification--success .notification__content i:first-child {
    color: #10b981;
}

.notification--error .notification__content i:first-child {
    color: #ef4444;
}

.notification--info .notification__content i:first-child {
    color: #3b82f6;
}

.notification__content span {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification__close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.notification__close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* Dark theme notification styles */
[data-theme="dark"] .notification {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .notification--success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

[data-theme="dark"] .notification--error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

[data-theme="dark"] .notification--info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

[data-theme="dark"] .notification__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Form focus improvements */
.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Success state for form fields */
.form-group input.success,
.form-group textarea.success {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

/* Mobile responsive notifications */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification--show {
        transform: translateY(0);
    }
    
    .notification__content {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

/* Spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Form validation improvements */
.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    transition: all 0.3s ease;
}

.form-group input:valid,
.form-group textarea:valid {
    border-color: var(--border);
}

.form-group label {
    transition: color 0.3s ease;
}

.form-group:has(.error) label {
    color: #ef4444;
}

.form-group:has(input:focus) label,
.form-group:has(textarea:focus) label {
    color: var(--primary);
}

/* Character counter for message field */
.char-counter {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    pointer-events: none;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.error {
    color: #ef4444;
}