/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    direction: rtl; /* Right-to-left for Arabic */
}

header {
    background-color: #007bff;
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #0056b3;
}

main {
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Departments Container (index.html) */
.departments-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for many departments */
    gap: 20px; /* Space between department columns */
    justify-content: flex-start; /* Align columns to the start */
}

.department-column {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    min-width: 250px; /* Minimum width for a department column */
    flex-grow: 1; /* Allow columns to grow */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.department-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.department-header h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    text-align: center;
}

.time-select-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.time-select-container label {
    margin-left: 5px;
    font-size: 0.9rem;
}

.shift-time-select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

.employee-list {
    list-style-type: none;
    padding: 0;
}

.employee-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.employee-item:hover {
    background-color: #f0f0f0;
}

.employee-item .employee-name {
    flex-grow: 1;
}

.action-container {
    display: flex;
    align-items: center;
}

.employee-item button, 
.employee-item select {
    margin-right: 5px; /* RTL: margin-left */
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: #e9ecef;
    font-size: 0.9rem;
}

.employee-item button:hover {
    background-color: #d3d9df;
}

.employee-item .action-btn {
    background-color: #ffc107; /* Yellow for attention */
    color: #333;
}

.employee-item .action-btn:hover {
    background-color: #e0a800;
}

.employee-item .transfer-btn {
    background-color: #17a2b8; /* Info blue */
    color: white;
}

.employee-item .transfer-btn:hover {
    background-color: #138496;
}

.department-select-dropdown,
.department-transfer-dropdown {
    margin-right: 5px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Modal Styles (index.html) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fff;
    margin: 10% auto; 
    padding: 25px;
    border: 1px solid #bbb;
    width: 60%; 
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
}

.close-btn {
    color: #aaa;
    float: left; /* RTL: float right */
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 20px; /* RTL: right: 20px */
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#addEmployeeForm h3, #employeeListContainer h3 {
    color: #007bff;
    margin-top: 20px;
}

#addEmployeeForm input[type="text"],
#addEmployeeForm select,
#addEmployeeForm button {
    width: calc(100% - 22px); /* Adjust for padding/border */
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#addEmployeeForm button {
    background-color: #28a745;
    color: white;
    cursor: pointer;
}

#addEmployeeForm button:hover {
    background-color: #218838;
}

#employeeListContainer .employee-management-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

#employeeListContainer .employee-management-item:last-child {
    border-bottom: none;
}

#employeeListContainer button {
    padding: 5px 10px;
    margin-right: 5px; /* RTL: margin-left */
    cursor: pointer;
}

#employeeListContainer .edit-btn {
    background-color: #ffc107;
}

#employeeListContainer .delete-btn {
    background-color: #dc3545;
    color: white;
}

/* Vacation Tracker Page (vacation_tracker.html) */
#vacationTrackerTableContainer table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#vacationTrackerTableContainer th,
#vacationTrackerTableContainer td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}

#vacationTrackerTableContainer th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

#vacationTrackerTableContainer tr:nth-child(even) {
    background-color: #f2f2f2;
}

#vacationTrackerTableContainer tr:hover {
    background-color: #e9ecef;
}

.vacation-indicator {
    padding: 5px 8px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    text-align: center;
}

.indicator-normal {
    background-color: #28a745; /* Green */
}

.indicator-low {
    background-color: #ffc107; /* Yellow */
}

.indicator-high {
    background-color: #dc3545; /* Red */
}

/* Utility Classes */
.hidden {
    display: none;
}
