/* General page styles */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f5f5f5;
}

h1 {
    color: #333;
    text-align: center;
}

/* Form styles */
form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

textarea {
    height: 100px;
}

/* Button styles */
button[type="submit"],
#fetch-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

button[type="submit"]:hover,
#fetch-btn:hover {
    background-color: #45a049;
}

/* View styles */

.view-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

.view-btn:hover {
    background-color: #45a049;
}

/* Message styles */
.success-message {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 10px;
    margin: 20px 0;
    border-radius: 4px;
}

.error-message {
    background-color: #f2dede;
    color: #a94442;
    padding: 10px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 0.8em;
    display: none;
}

/* Checkbox group */
.checkbox-group {
    margin: 10px 0;
}

/* Email container */
.email-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#email {
    flex-grow: 1;
}

/* Fetch status */
#fetch-status {
    margin-top: 5px;
    font-size: 0.9em;
}

/* Required field mark */
.required-field::after {
    content: " *";
    color: red;
}

/* Section styles */
#new-user-section, 
#user-details-section,
#remove-user-section {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
}

#new-user-section h3, 
#user-details-section h3,
#remove-user-section h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.section-divider {
    border: 1px solid #ccc;  /* Light gray line */
    margin: 20px 0;          /* Adds space above and below */
    width: 100%;             /* Makes sure it stretches fully */
}

/* Modification section styles */
#modify-user-section {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
}

#modify-user-section h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.modify-fields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

/* Logo and Title Styling */
.header-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.header-content {
    display: inline-block;
    position: relative;
}

.company-logo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.company-logo-img {
    height: 100%;
    width: auto;
    max-height: 80px;
    display: block;
}

h1 {
    display: inline-block;
    margin: 0;
    padding: 0 0 0 0px; /* Default padding, adjusted by JS */
    line-height: 1.2;
    transition: padding 0.3s ease;
}

/* File upload styling */
.file-upload-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.file-upload-container input[type="file"] {
    display: none;
}

.browse-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.browse-btn:hover {
    background-color: #e0e0e0;
}

/* File preview container styling */
.file-preview-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    background-color: #f9f9f9;
}

.file-preview-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.3s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.file-name {
    flex-grow: 1;
    cursor: pointer;
    color: #0066cc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.file-name:hover {
    text-decoration: underline;
}

.file-size {
    color: #666;
    margin-right: 10px;
    font-size: 0.85em;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    font-weight: bold;
}

.remove-file-btn:hover {
    color: #cc0000;
}

#no-files-message {
    color: #666;
    font-style: italic;
    padding: 10px 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-message {
    background-color: #e6f7e6; /* Light green background */
    color: #2e7d32; /* Darker green text for contrast */
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: 500; /* Slightly less bold */
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #4CAF50; /* Green accent border */
    animation: gentleFadeIn 0.6s ease-out;
}

@keyframes gentleFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.select2-container .select2-results__option {
    font-family: 'Arial', sans-serif !important;
    font-size: 14px !important;
    font-weight: normal !important;
    color: #000000 !important; /* Makes text black */
}

/* Custom styling for Select2 dropdowns */

#new-user-section .select2-container,
#modify-user-section .select2-container {
    width: 100% !important;
}

/* Make the Select2 container taller to match other form fields */
.select2-container .select2-selection--single {
    height: 34px !important; /* Adjust this value to match your other fields */
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

/* Center the text vertically in the taller container */
.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 32px !important; /* Should be container height minus 2px for borders */
    padding-left: 12px !important;
    padding-right: 20px !important;
}

/* Style the dropdown arrow */
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 32px !important;
    top: 1px !important;
    right: 1px !important;
}

/* Make placeholder text smaller and lighter */
.select2-container .select2-selection--single .select2-selection__placeholder {
    font-size: 12px !important;
    color: #999 !important;
    font-style: italic !important;
}

/* Style for when an option is selected (normal size) */
.select2-container .select2-selection--single .select2-selection__rendered:not(.select2-selection__placeholder) {
    font-size: 14px !important;
    color: #333 !important;
    font-style: normal !important;
}

/* Dropdown options styling */
.select2-results__option {
    font-size: 14px !important;
    padding: 8px 12px !important;
}

/* Focus state */
.select2-container--default .select2-selection--single:focus {
    border-color: #007cba !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.3) !important;
}

/* Dropdown container styling */
.select2-container--default .select2-dropdown {
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Search box in dropdown (if enabled) */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    font-size: 14px !important;
}

/* Hover state for options */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #007cba !important;
    color: white !important;
}

/* Selected option in dropdown */
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}