/* css/form.css */

/* Styling for the Contact Form */
#contact-form {
    max-width: 600px;
    margin: 0 auto; /* Center the form */
    padding: calc(var(--spacing-unit) * 3);
    background-color: var(--background-color); /* Use general background color */
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 2); /* Space between form groups */
}

.form-group label {
    display: block; /* Labels on their own line */
    margin-bottom: var(--spacing-unit);
    font-weight: bold;
    color: var(--primary-dark); /* Use a primary dark color for labels */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%; /* Full width */
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5); /* Padding for input fields */
    border: 1px solid var(--border-color); /* Border color from theme */
    border-radius: var(--border-radius);
    background-color: var(--background-dark); /* Slightly darker background for input */
    color: var(--text-color);
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--primary-color); /* Highlight on focus */
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 3px hsla(var(--base-hue), var(--base-saturation), var(--base-lightness), 0.2); /* Subtle glow on focus */
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing, but not horizontal */
    min-height: 100px; /* Minimum height for text area */
}

#contact-form button[type="submit"] {
    display: block; /* Make the button take full width if desired, or just block level */
    width: auto; /* Auto width to fit content + padding */
    min-width: 150px; /* Give it a minimum width */
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 3);
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: calc(var(--spacing-unit) * 2); /* Space above the button */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#contact-form button[type="submit"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px); /* Slight lift effect */
}

/* Form feedback messages */
.form-feedback {
    margin-top: var(--spacing-unit);
    padding: var(--spacing-unit);
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
}

.form-feedback.success {
    background-color: var(--success-bg); /* Use new variable */
    color: var(--success-text); /* Use new variable */
}

.form-feedback.error {
    background-color: var(--error-bg); /* Use new variable */
    color: var(--error-text); /* Use new variable */
}

