/* General Styles */
/* Headers */
header {
    background: transparent;
    color: white;
    padding: 10px 0;
    font-size: 24px;
    margin: 0;
}

header h1, h2, h3, h4 {
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    background: transparent; /* added to remove blue background */
}

header h3 {
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    background: transparent; /* added to remove blue background */
}

.header-title, #header-title, #availability-summary {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    text-align: center;
    font-size: 2em;
}

/* Containers */
.container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    user-select: text;
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

table th {
    background-color: #0056b3;
    color: white;
}

/* Buttons */
button, .btn, a.btn {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    margin: 5px;
}

.btn-action {
    height: 30px;  /* Adjust as needed */
    padding: 5px 10px; /* Ensure text still fits well */
}

/* Red-Orange Button */
.generate-button.generate-schedule {
    background-color: #FF4500; /* Red-Orange */
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.generate-button.generate-schedule:hover {
    background-color: #FF6347; /* Lighter Red-Orange on hover */
}

/* Orange Buttons */
.btn-generated-schedule {
    background-color: #FFA500; /* Orange */
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.btn-generated-schedule:hover {
    background-color: #FFB347; /* Lighter Orange on hover */
}

/* Dark Yellow Buttons */
.btn-selected-schedule {
    background-color: #FFD700; /* Dark Yellow */
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.btn-selected-schedule:hover {
    background-color: #FFDF80; /* Lighter Yellow on hover */
}

button:hover, .btn:hover, a.btn:hover {
    opacity: 0.9;
}

.btn-edit {
    background-color: #4CAF50;
}

.btn-edit:hover {
    background-color: #45a049;
}

.btn-delete {
    background-color: #FF4C4C;
}

.btn-delete:hover {
    background-color: #d93636;
}


.delete-button {
    background-color: #d9534f; /* Bootstrap danger red */
    border: none;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease-in-out;
}

.delete-button:hover {
    background-color: #c9302c;
    cursor: pointer;
}


.btn-back {
    background-color: #0056B3;
    color: white; /* ✅ Zapewnia widoczność tekstu */
    padding: 10px 20px;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-back:hover {
    background-color: #0056b3;
    color: white; /* Dodatkowe zabezpieczenie, że kolor tekstu nie zmieni się */
}

@media (max-width: 576px) {
    .flex-wrap-sm {
        flex-wrap: wrap !important;
    }
}

/*a.btn.btn-back {*/
/*    background-color: #007BFF;*/
/*    color: white !important; !* <- zapewnia widoczność tekstu *!*/
/*    padding: 10px 20px;*/
/*    border: none;*/
/*    text-decoration: none;*/
/*    display: inline-block;*/
/*    text-align: center;*/
/*    font-weight: bold;*/
/*    border-radius: 5px;*/
/*    transition: background-color 0.3s ease;*/
/*}*/

/*a.btn.btn-back:hover {*/
/*    background-color: #0056b3;*/
/*    color: white !important;*/
/*}*/

.register-button {
    background-color: #28a745;
}

.register-button:hover {
    background-color: #218838;
}

.btn-password-change,

.btn-logout {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.btn-logout:hover {
    background-color: red;
    color: white;
}

.btn-password-change:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* Using ../../static/images due to current static folder structure and Whitenoise serving setup */
body {
    background: url('../../static/images/mediPlan-background.png') center/cover no-repeat;
    position: relative;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    /*background-color: #f9f9f9;*/
}

body::before {
    content: "";
    background: url('../../static/images/mediPlan-background.png') no-repeat center center fixed;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

button {
    font-size: 14px;
    background-color: #0056B3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.dynamic-container div {
    background-color: rgba(255,255,255,0.85);
    border-radius: 5px;
}

.dynamic-container div h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.dynamic-container div p {
    font-size: 14px;
    color: #555;
}

/* Forms */
form {
    display: inline-block;
    text-align: left;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.full-span-center {
  grid-column: 1 / -1; /* spans all columns */
  text-align: center;
}

.form-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
    animation: fadeIn 1s ease forwards;
}

.form-wrapper.shift-swap-approval,
.form-wrapper.notification-settings,
.form-wrapper.standard-view {
    max-width: 1400px;
    width: 95%;
    margin: 50px auto;
    display: flex;
    justify-content: center;
}


.form-card {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1px 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
}

.form-schedule {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1px 20px;
    border-radius: 8px;
    min-width: 1200px;
    width: 90%;
}

.form-card label {
    font-weight: bold;
}

#year-label {
    display: block;
    text-align: left;
}

#month-label {
    display: block;
    text-align: left;
}

.form-card select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.centered-form label,
.centered-form select,
.my-toolbar {
    width: 100%;
    text-align: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.my-toolbar button {
    margin: 5px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    text-align: center;
    font-size: 16px;
}

.popup button {
    margin-top: 10px;
    background-color: #721c24;
    color: white;
}

.popup button:hover {
    background-color: #501a18;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.popup-content {
    pointer-events: auto;
}

/* Info-style popup for shift claim */
.popupShiftManipulation {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    text-align: center;
    font-size: 16px;
}

.popupShiftManipulation button {
    margin-top: 10px;
    background-color: #0c5460;
    color: white;
}

.popupShiftManipulation button:hover {
    background-color: #083a4a;
}

/* Additional Styles */
a {
    text-decoration: none;
    color: #0056B3;
}

a:hover {
    text-decoration: underline;
}

#top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

#dropdown-container {
    width: 50%;
}

.dropdown-pair {
    margin-bottom: 5px; /* reduce space between groups */
}

.dropdown-pair label,
.dropdown-pair select {
    font-size: 1.6rem;
    height: 45px;
    min-width: 160px;
    padding: 4px 10px;
    display: block;
    margin-bottom: 4px; /* spacing between label and select */
}

.dropdown-toolbar-btn {
    display: block;
    width: 100%;
    padding: 5px 0;
    font-size: 0.95em;
    background-color: #0056b3; /* deep professional blue */
    color: white;
    border: none;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dropdown-toolbar-btn:hover {
    background-color: #004494; /* darker shade on hover */
}

#user-info-container {
    width: 40%;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

#user-table {
    width: 100%;
    border-collapse: collapse;
}

#user-table th, #user-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#user-table th {
    background-color: #acac50;
}

#calendar-section {
    margin-top: 20px;
}

/* Style the dropdown forms */
#dropdown-container {
    max-width: 10%;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.dropdown-container select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    margin: 0 10px;
}

.dropdown-container button {
    padding: 10px 16px;
    background-color: #0056B3;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.dropdown-container button:hover {
    background-color: #0056b3;
}

.dropdown-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropdown-buttons button {
    padding: 4px 10px;
    font-size: 0.9em;
    width: auto;
    min-width: fit-content;
    white-space: nowrap;
}

#settings-column {
    max-width: 10%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#schedule-table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: rgba(255,255,255,0.9);
}

#schedule-table th, #schedule-table td {
    padding: 8px;
    border: 1px solid #ccc;
}

#schedule-table th {
    background-color: #0056b3;
    color: white;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h2#schedule-header {
    text-align: center;
    color: black;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin-top: 30px;
    margin-bottom: 30px;
}

#dropdown-container select,
#dropdown-container button,
#settings-column input {
    width: 100%;
}

#settings-column label {
    font-size: 0.9em;
}

.drop-target {
    min-width: 40px;
    min-height: 20px;
    padding: 5px;
    border: 1px dashed #ccc;
    display: inline-block;
    vertical-align: middle;
}
.placeholder {
    color: #999;
    font-style: italic;
}

.ward-section {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px;
    text-align: center;
    background-color: #f9f9f9;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(7, 50px); /* 7 columns for days of the week */
    gap: 5px;
    justify-content: center;
}

.grid-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background-color: #fff;
    user-select: none;
    cursor: pointer;
}

.grid-item.green {
    background-color: #4caf50; /* Green for need === 1 */
    color: #fff;
    font-weight: bold;
}

.button-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two equal-width columns */
    gap: 15px; /* Space between buttons */
    justify-items: center; /* Center buttons horizontally */
    align-items: center; /* Center buttons vertically */
    padding: 20px; /* Space around the grid */
}

.button-grid-container button {
    width: 150px; /* Set a fixed width */
    height: 60px; /* Set a fixed height */
    padding: 10px; /* Inner padding for text */
    font-size: 14px; /* Font size */
    text-align: center; /* Center text horizontally */
    line-height: 1.2; /* Adjust line height for multi-line text */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0056B3; /* Blue button background */
    color: white;
    display: flex; /* Flexbox for centering text */
    justify-content: center; /* Center text horizontally */
    align-items: center; /* Center text vertically */
}

.button-grid-container button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.right-button-container {
    border: 1px dashed #ccc; /* Dashed border for visual distinction */
    text-align: center;
    color: #666; /* Placeholder text color */
    min-height: 100px; /* Minimum height to balance layout */
}

.ward-section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.day-square {
    width: 30px;
    height: 30px;
    display: inline-block;
    text-align: center;
    line-height: 30px;
    margin: 5px;
    border: 1px solid #000;
    cursor: pointer;
}

.day-square:hover {
    opacity: 0.8;
}

 .day-square.updated {
     transition: box-shadow 0.3s ease-in-out;
     box-shadow: 0 0 10px yellow;
 }
 .day-square.updated:hover {
     opacity: 1;
 }
.ward-section h3 {
    text-align: center;
    margin-bottom: 10px;
}

/* Ward section container */
.ward-section {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
}

/* Container for each calendar field */
.field-calendar-container {
    border: 2px solid #333; /* Black border around each calendar */
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Header row: Monday to Sunday */
.calendar-header {
    font-weight: bold;
    text-align: center;
}

/* Calendar grid for each ward */
.ward-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Seven columns for Monday-Sunday */
    gap: 5px; /* Space between cells */
    margin-top: 10px;
}

/* Day square styling */
.calendar-square {
    border: 1px solid #ddd;
    padding: 10px 0;
    text-align: center;
    border-radius: 4px;
    background-color: #f0f0f0; /* Default background */
    cursor: pointer;
}

/* Base styling for calendar squares */
.calendar-square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; /* Uniform size */
    height: 50px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}

/* Clickable (enabled) cells */
.clickable-cell {
    align-items: center !important;
    border: 2px solid #007bff;
}

/* Active selected cells */
.clickable-cell.active {
    background-color: lightgreen;
    color: white;
}

/* Unselected inactive periods */
.disabled-cell {
    background-color: #e0e0e0 !important; /* Light grey */
    color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Selected inactive periods */
.inactive-active {
    background-color: #b0b0b0 !important; /* Darker grey */
    color: white;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ✅ Clickable row for toggling whole weekdays */
.toggle-row {
    display: flex;
    justify-content: space-between;
    gap: 5px; /* Add space between buttons */
    margin-bottom: 10px; /* Space before actual calendar */
}

.toggle-btn {
  cursor: pointer;
  font-size: 1.5em;
  display: inline-block;
  text-align: center;
}

.toggle-weekday {
    padding: 5px 8px; /* Smaller size */
    font-size: 14px;
    background-color: lightblue;
    border: 1px solid blue;
    border-radius: 4px;
    cursor: pointer;
}

/* ✅ Proper spacing to avoid overlap */
.calendar-container {
    padding-top: 5px;
}

.toggle-weekday:hover {
    background-color: deepskyblue;
}

.calendar-square.empty {
    background-color: transparent;
    border: none;
    cursor: default;
}

.calendar-square:hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Header for ward name */
.ward-section h3 {
    text-align: center;
    margin-bottom: 10px;
}

/* Colors for days */
.calendar-square.green {
    background-color: lightgreen;
    color: white;
}

.calendar-square.red {
    background-color: lightcoral;
    color: white;
}



.warning-button {
    background-color: #dc3545; /* Red button for warnings */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.warning-button:hover {
    background-color: #c82333; /* Slightly darker red on hover */
}


.view-only {
    color: grey;
    pointer-events: none; /* Disable editing */
    background-color: #f9f9f9;
}

.editable {
    background-color: #fff;
    border: 1px solid #ccc;
}

/* Make sure table layout adapts naturally to content */
#editable-fields-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

/* Let content define width */
#editable-fields-table th,
#editable-fields-table td {
    padding: 8px;
    vertical-align: middle;
}

/* Tighten up the toggle column */
#editable-fields-table td:last-child {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

.new-row {
    background-color: #e0f7fa; /* Light blue */
}

.new-row .editable {
    background-color: #fffbe6; /* Light yellow for editable fields */
}

/* General styles for the table */
#shift-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#shift-table th, #shift-table td {
    text-align: center;
    border: 1px solid #ccc;
    padding: 5px;
}

.table-wrapper {
    max-height: 310px; /* enough for ~7 rows */
    overflow-y: auto;
    border: 1px solid #ccc;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrapper thead th {
    position: sticky;
    top: 0;
    background: #0056B3;
    z-index: 2;
}

/*#progress-modal {*/
/*    display: none;*/
/*    position: fixed;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    background-color: rgba(0, 0, 0, 0.5);*/
/*    z-index: 1000;*/
/*}*/

/*#progress-modal div {*/
/*    position: absolute;*/
/*    top: 50%;*/
/*    left: 50%;*/
/*    transform: translate(-50%, -50%);*/
/*    background-color: white;*/
/*    padding: 20px;*/
/*    border-radius: 10px;*/
/*    text-align: center;*/
/*    max-width: 400px;*/
/*    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
/*}*/

/*#progress-bar {*/
/*    width: 0%;*/
/*    height: 10px !important;*/
/*    max-height: 3px;*/
/*    background-color: lightgreen;*/
/*    border-radius: 2px !important;*/
/*    position: relative;*/
/*    overflow: hidden;*/
/*    margin: 10px auto 0; !* Add spacing below the progress message *!*/
/*    box-shadow: none !important;*/
/*    padding: 0 !important;*/
/*}*/

/*#progress-container {*/
/*    width: 100%;*/
/*    height: auto;*/
/*    margin: 0;*/
/*    padding: 0;*/
/*    text-align: center;*/
/*    position: relative;*/
/*    display: block;*/
/*}*/

/*#progress-message {*/
/*    margin-bottom: 30px; !* Add spacing above the progress bar *!*/
/*    font-size: 14px;*/
/*    font-weight: bold;*/
/*    color: black; !* Ensure the text is visible *!*/
/*    z-index: 2; !* Make sure text stays above the bar *!*/
/*    position: relative; !* Context for z-index *!*/
/*}*/

#progress-modal {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1000; /* Ensure it’s above other elements */
    display: flex; /* Flexbox for centering */
    justify-content: center; /* Horizontal centering */
    align-items: center; /* Vertical centering */
}

#progress-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1000; /* Ensure it’s above other elements */
    display: flex; /* Flexbox for centering */
    justify-content: center; /* Horizontal centering */
    align-items: center; /* Vertical centering */
}

#progress-modal > div {
    background-color: white; /* Modal content background */
    border-radius: 12px; /* Slightly rounded corners */
    padding: 20px 30px; /* Add some padding inside the modal */
    text-align: center; /* Center-align text */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Add shadow for better visibility */
    max-width: 400px; /* Prevent the modal from being too wide */
    width: auto; /* Adjust width to content */
}

#progress-message {
    font-size: 18px; /* Larger text for the message */
    color: #333; /* Dark gray for readability */
    font-weight: bold; /* Bold text for emphasis */
}

/* Center the clickable cell in the specific column */
.is-active-column {
    text-align: center !important;
    vertical-align: middle !important;
    display: flex;
    justify-content: center;
}

.toggle-active {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px; /* Adjust width */
    height: 35px; /* Adjust height */
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    margin: 0 auto; /* ✅ Center within table cell */
}

/* Specific styling for the clickable cell */
.is-active-column .clickable-cell {
    display: inline-block; /* Ensure it behaves like a block within the table cell */
    margin: 0; /* Remove default margins */
    transform: translate(0, 0); /* Reset translate */
    position: static; /* Static positioning ensures compatibility */
    line-height: 1.5; /* Adjust for vertical alignment */
    width: 20px; /* Adjust width if necessary */
    height: 20px; /* Adjust height if necessary */
}

/* Active state */
.clickable-cell.active {
    background-color: lightgreen;
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.clickable-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; /* Adjust size as needed */
    height: 50px; /* Adjust size as needed */
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

/* Inactive state */
.clickable-cell.inactive {
    background-color: lightcoral;
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.disabled-cell {
    background-color: #d3d3d3 !important; /* Light grey */
    color: #888 !important; /* Grey text */
    cursor: not-allowed !important; /* Indicate it's not clickable */
    pointer-events: none; /* Disable clicking */
}

/* Disabled cells (cannot be clicked) */
.disabled-cell-wishes {
    background-color: #d3d3d3 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Ensure all months have the same size */
.month-container {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

/* Active month should not be larger than inactive ones */
.month-container.active {
    background-color: #007bff;
    color: white;
    transform: scale(1.05); /* Slight highlight effect */
}

/* Inactive months */
.month-container.inactive {
    background-color: #ccc;
    color: black;
}

/* Ensure calendar grid remains consistent */
.ward-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 50px); /* Ensure consistent size */
    gap: 5px;
    justify-content: center;
}

/* Lighter grey for available (true) */
.lighter-grey {
    background-color: #d3d3d3; /* Light grey */
    color: black;
}

/* Darker grey for not available (false) */
.darker-grey {
    background-color: #808080; /* Dark grey */
    color: white;
}

/* Disable interaction for unavailable items */
.disabled {
    pointer-events: none; /* Prevent clicking */
    opacity: 0.6; /* Reduce visibility */
}

.doctor-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 10px; /* Space between buttons */
    justify-content: center;
    max-width: 400px; /* Adjust width if needed */
    margin: 0 auto;
}

.doctor-list li {
    background-color: #d6d8db; /* Lighter gray */
    color: black; /* Ensure text remains readable */
    border: 1px solid #bfc2c5; /* Slightly darker border */
    border-radius: 5px;
    padding: 12px 15px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.doctor-list li:hover {
    background-color: #c2c4c7; /* Slightly darker gray on hover */
}

.draggable-btn {
    background-color: #ccc; /* grey color */
    color: #333;
    border: 1px solid #999;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: move;
    font-size: 14px;
}

button.draggable-btn {
    background-color: #ccc !important;  /* Grey background */
    color: #333 !important;             /* Dark grey text */
    border: 1px solid #999 !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    cursor: move !important;
    font-size: 14px !important;
}

/* Fix scrolling issue - Only the container should scroll */
.periodic-assignments-container {
    position: relative;
    margin-right: 20px;
    width: 100%;
    max-height: 450px; /* Ensures only 10 rows visible at a time */
    overflow-y: auto; /* Enables scrolling */
    border: 1px solid #ccc;
}

/* Ensure table header stays fixed while scrolling */
.periodic-assignments-container table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensures alignment */
}

/* Keep the header always visible */
.periodic-assignments-container thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

/* Fix alignment between header and body */
.periodic-assignments-container thead th {
    min-width: 120px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
}

/* Ensure rows are inside the scrollable area */
.periodic-assignments-container tbody {
    overflow-y: auto; /* Allows scrolling */
}

/* Fix scrolling issue - Only the container should scroll */
.assignment-stats {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow-y: auto; /* Enables scrolling */
    border: 1px solid #ccc;
}

/* Ensure table header stays fixed while scrolling */
.assignment-stats table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensures alignment */
}

/* Keep the header always visible */
.assignment-stats thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

/* Fix alignment between header and body */
.assignment-stats thead th {
    min-width: 120px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
}

/* Ensure rows are inside the scrollable area */
.assignment-stats tbody {
    overflow-y: auto; /* Allows scrolling */
}

/* Ensure consistent container styling */
.other-doctors-section {
    border: 1px solid #939292;
    padding: 15px;
    margin-top: 20px;
    background-color: #f9f9f9;
    text-align: center;
}

/* Doctor grid container */
.doctor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 10px;
    max-width: 600px;
    margin: 20px auto;
}

/* Doctor buttons */
.doctor-button {
    background-color: #e2e6ea; /* Light grey background */
    color: #333; /* Slightly darker text for contrast */
    font-weight: bold;
    border: 1px solid #bfc2c5;
    border-radius: 5px;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 120px;
}

/* Hover effect */
.doctor-button:hover {
    filter: brightness(90%);
    background-color: #d6d8db;
}

/* Dragging effect */
.doctor-button:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.table-centered {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table-centered th,
.table-centered td {
  text-align: center;
  padding: 6px;
  min-width: 40px;
  max-width: 80px;
  border: 1px solid #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-centered thead th {
  background-color: #0056B3;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 8px;
}

.table-container {
  background: white; /* or rgba(255,255,255,0.9) for semi-transparent */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  max-width: 90%;
  margin: auto;
  position: relative; /* enables z-index */
  z-index: 2;
}

.table-floating-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-top: 20px;
    overflow-x: auto;
}

.fixed-width-btn {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.horizontal-list {
  display: flex;
  flex-wrap: nowrap; /* ✅ Prevent wrapping to new lines */
  gap: 12px;
  padding: 0;
  margin: 20px;
  list-style: none;
  justify-content: flex-start;
  overflow-x: auto; /* ✅ Horizontal scroll if overflow */
}

.horizontal-list li {
  flex: 0 0 auto; /* ✅ Prevent items from stretching */
  padding: 12px 16px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  cursor: move;
  border-radius: 5px;
  min-width: 20px;
  text-align: center;
  user-select: none;
  white-space: nowrap;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

/* Holiday grid: let content determine column width, full width */
.holiday-grid {
    table-layout: auto; /* let content determine column width */
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 14px;
}

.holiday-grid th {
    background-color: #0056b3; /* Deep blue header */
    color: white;
    padding: 8px;
    border: 1px solid #ccc;
}

.holiday-grid td {
    border: 1px solid #ddd;
    text-align: center;
    padding: 6px;
    min-width: 35px; /* ensures enough space for 2-digit days with margin */
    max-width: 50px; /* prevents excessive widening */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.holiday-grid tr:nth-child(even) {
    background-color: #f9f9f9;
}

.holiday-grid tr:hover {
    background-color: #e6f0ff; /* Light blue on hover */
}

.holiday-grid td.accepted {
    background-color: #4caf50 !important; /* Bright green */
    color: white;
    font-weight: bold;
}

.holiday-grid td.pending {
    background-color: #f39c12 !important; /* Orange */
    color: white;
    font-weight: bold;
}

.holiday-grid td.peak {
    font-weight: bold;
}

.shift-manipulation-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f5f5f5;
    border: 1px solid #aaa;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

.shift-manipulation-popup h3 {
    margin-top: 0;
    font-size: 18px;
    color: white;
}

.shift-manipulation-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.shift-manipulation-cancel {
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.shift-manipulation-cancel:hover {
    background-color: #ddd;
}

.shift-manipulation-send {
    background-color: #1976d2;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.shift-manipulation-send:hover {
    background-color: #125ea4;
}

.notification-group {
  border: 3px solid #000;
}

.notification-group tr td {
  border: 1px solid #aaa;
}

.notification-group tr:first-child td {
  border-top: 3px solid #000;
}

.notification-group tr:last-child td {
  border-bottom: 3px solid #000;
}

.custom-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 10000;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    font-size: 16px;
    text-align: center;
}

/* Toast color variants */
.custom-toast-info {
    background-color: #3498db; /* blue */
}

.custom-toast-success {
    background-color: #2ecc71; /* green */
}

.custom-toast-warning {
    background-color: #f39c12; /* orange */
}

.custom-toast-error {
    background-color: #e74c3c; /* red */
}

.custom-toast-warning.visible {
    opacity: 1;
    transform: translateY(0);
}

.color-column {
    width: 100px;
}

.color-box {
    width: 32px;
    height: 32px;
    display: inline-block;
    border: 1px solid #333;
    border-radius: 4px;
}

#availability-groups-table td.flag-cell {
    vertical-align: top;
    max-width: 250px;
    word-wrap: break-word;
}

.flags-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.notification-icon {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}


/*Help styles*/
.intro-custom-tooltip {
    z-index: 999999 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.table-floating-wrapper {
    max-width: 1000px; /* or desired width for card-like look */
    margin: 20px auto; /* centers it horizontally with vertical spacing */
    background: white; /* solid background */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow-x: auto; /* horizontal scroll if needed */
}

.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* ensure it's above all other elements */
}

.loading-spinner-content {
    text-align: center;
    color: white;
}

.loading-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4); /* Dimmed background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading-spinner-overlay.show {
    opacity: 1;
}

.loading-spinner-content {
    text-align: center;
    color: white;
}

.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

.loading-spinner .spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}