/* Base Styles and Resets */
:root {
    --primary-orange: #f38b28;
    --primary-blue: #007bff; /* Blue for the submit button */
    --primary-blue-hover: #0069d9;
    --text-color: #333;
    --label-color: #555;
    --border-color: #ccc;
    --background-color: #f7f7f7;
    --white: #fff;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --success-text: #155724;
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --error-text: #721c24;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Main form container with orange border */
.container {
    background-color: var(--white);
    padding: 40px;
    /* MODIFICATION: Increased border thickness for more emphasis */
    border: 12px solid var(--primary-orange);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#form-logo {
    display: block;
    max-width: 200px; /* Adjust size as needed */
    margin-bottom: 25px;
}

/* Form Header */
.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.support-info {
    font-size: 16px;
    margin-bottom: 24px;
}

/* Form Groups and Layout */
.form-group {
    /* MODIFICATION: Reduced bottom margin to tighten spacing between form elements */
    margin-bottom: 10px;
}

/* Labels and Field Descriptions */
label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--label-color);
    margin-bottom: 8px;
}

label .required-star {
    color: #d9534f;
    margin-left: 2px;
}

.field-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}


/* Input, Select, and Textarea Fields */
input[type="text"],
input[type="email"],
select,
textarea,
input[type="file"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--white);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="file"] {
    padding: 3px;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(243, 139, 40, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

::placeholder {
    color: #aaa;
}

.field-hint {
    font-size: 14px;
    color: #6c757d; /* Muted gray color */
    margin-top: 5px;
    transition: color 0.3s ease;
}

.field-hint.highlight-error {
    color: var(--error-text);
    font-weight: 500;
}

/* Submit Button */
.submit-button-wrapper {
    margin-top: 16px;
}

.submit-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.submit-btn:hover {
    background-color: var(--primary-blue-hover);
}

.submit-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* Response Message Styling */
#response-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    display: none; /* Hidden by default */
    font-size: 16px;
    border: 1px solid transparent;
}

#response-message.success {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
    display: block;
}

#response-message.error {
    background-color: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
    display: block;
}

.file-count-status {
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.file-count-ok {
    color: var(--success-text);
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    display: block;
    padding: 6px 8px;
    border-radius: 4px;
}

.file-count-over-limit {
    color: var(--error-text);
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    display: block;
    padding: 6px 8px;
    border-radius: 4px;
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 14px;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #d9534f;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.remove-file-btn:hover {
    color: #a94442;
}

.validation-message {
    color: #D8000C; /* Red color for errors */
    font-size: 0.875em;
    margin-top: 5px;
    min-height: 1.2em; /* Prevents form layout from shifting */
}

/* Hide Vault ID field by default */
#environment {
    display: none;
}

#environment + label,
label[for="environment"] {
    display: none;
}

.form-group:has(#environment) {
    display: none;
}


/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 20px;
    }
    .form-header h2 {
        font-size: 22px;
    }
}