/* Additional Frontend Styles for Field Errors */

.field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.field-error::before {
    content: '⚠';
    font-weight: bold;
}

.form-input.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-group.focused .form-label {
    color: #6366f1;
}

.form-group.has-value .form-label {
    transform: translateY(-0.5rem);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Character counter styles */
.char-counter {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.danger {
    color: #ef4444;
    font-weight: 600;
}

/* Copy tooltip */
.copy-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    z-index: 10000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Admin tooltip */
.admin-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    max-width: 200px;
    z-index: 10000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

/* Form submission states */
.inquiry-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

.inquiry-form.submitting .submit-btn {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Enhanced focus states */
.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Smooth transitions */
.form-input,
.submit-btn,
.form-messages {
    transition: all 0.2s ease-in-out;
}

/* Success state for inputs */
.form-input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

.form-input:valid:not(:placeholder-shown) + .field-success {
    display: block;
}

.field-success {
    display: none;
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.field-success::before {
    content: '✓';
    margin-right: 0.25rem;
    font-weight: bold;
}

/* Loading overlay */
.form-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 16px;
}

/* Modal enhancements */
.submission-modal {
    backdrop-filter: blur(4px);
}

.submission-modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .inquiry-form {
        background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
        color: #f9fafb;
    }
    
    .form-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-input::placeholder {
        color: #9ca3af;
    }
    
    .form-label {
        color: #e5e7eb;
    }
    
    .field-icon {
        color: #8b5cf6;
    }
}
