/* Form styling for contact form */
.form-control {
    width: 100%;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    background-color: #374151;
    color: white;
    transition: all 0.15s ease-in-out;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-family: inherit;
}

/* Ensure dark mode styling is applied */
.dark .form-control {
    border: 1px solid #4b5563;
    background-color: #374151;
    color: white;
}

.dark .form-control:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #667eea;
}

.form-control:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #667eea;
}

/* Light mode styling (if needed) */
:not(.dark) .form-control {
    border-color: #d1d5db;
    background-color: white;
    color: #111827;
    font-family: inherit;
}

:not(.dark) .form-control:focus {
    box-shadow: 0 0 0 2px #667eea;
}

/* Textarea specific styling */
textarea.form-control {
    resize: vertical;
    min-height: 6rem;
}

/* Select dropdown styling */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.dark select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%9ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Placeholder styling for dark mode */
.form-control::placeholder {
    color: #9ca3af;
}

/* Light mode placeholder */
:not(.dark) .form-control::placeholder {
    color: #6b7280;
}

/* Ensure proper contrast for all form elements */
.form-control:hover {
    border-color: #6b7280;
}

.dark .form-control:hover {
    border-color: #6b7280;
}

/* Make sure the form fields blend well with the dark container */
.bg-soft .form-control {
    background-color: #374151;
    border-color: #4b5563;
    color: white;
}

.bg-soft .form-control:focus {
    background-color: #374151;
    border-color: transparent;
    box-shadow: 0 0 0 2px #667eea;
}

/* Preset button styling */
.preset-btn {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    transform: translateY(0);
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.preset-btn:active {
    transform: translateY(0);
}

/* Preset message styling */
.preset-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive form improvements */
@media (max-width: 768px) {
    .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    textarea.form-control {
        min-height: 8rem;
    }
}

/* Ensure form controls have consistent box-sizing */
.form-control,
.form-control:focus,
.form-control:hover {
    box-sizing: border-box;
}

/* Improve button styling consistency */
.btn {
    font-family: inherit;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

/* Fix any potential alignment issues */
.form-group,
.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    flex-direction: row;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Ensure proper styling for dark theme containers */
.dark .bg-soft {
    background-color: #1f2937 !important;
}

.dark .bg-zinc-800 {
    background-color: #1f2937 !important;
}

/* Fix any potential styling conflicts */
.form-control,
.form-control:focus,
.form-control:hover {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Ensure proper placeholder styling in dark mode */
.dark .form-control::placeholder {
    color: #9ca3af !important;
}

/* Make sure labels are visible */
.dark label {
    color: white !important;
}

/* Ensure proper button styling */
.btn {
    font-family: inherit;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.dark .btn {
    color: white;
}
