/* === Merged CSS File === */

/* Basic Styling */
body {
  font-family: sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header,
footer {
  background-color: #f0f0f0;
  padding: 1em;
  text-align: center;
}

header h1 {
  margin: 0;
}

main {
  flex-grow: 1;
  padding: 1em;
}

.container {
  width: 90%;
  margin: 0 auto;
  padding: 1em;
}

/* Navigation Menu Styling */
nav .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1em;
}

nav .nav-logo {
  font-size: 1.5em;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

nav .nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

nav .nav-menu li {
  margin-left: 1em;
}

nav .nav-menu li:first-child {
  margin-left: 0;
}

nav .nav-menu li a {
  text-decoration: none;
  color: #333;
  padding: 0.5em 1em;
  display: block;
}

nav .nav-menu li a:hover,
nav .nav-menu li a:focus {
  background-color: #ddd;
  border-radius: 4px;
}

nav button {
  margin: 0 0.5em;
  padding: 0.5em 1em;
  cursor: pointer;
}

/* Schedule Grid */
.schedule-container {
  width: 95%;
  margin: 0 auto;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 150px repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  background-color: #ccc;
}

#daily-gantt-editor-section {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box; /* Ensures padding and border don't add to the width */
}

.schedule-grid > div {
  background-color: #fff;
  padding: 8px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.grid-header {
  font-weight: bold;
  background-color: #f0f0f0 !important;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.staff-name-cell {
  font-weight: bold;
  background-color: #f8f8f8 !important;
  justify-content: center;
}

.day-cell:hover {
  background-color: #f0f8ff !important;
  cursor: pointer;
}

.shifts-container {
  margin-top: 5px;
  font-size: 0.85em;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shift-entry {
  background-color: #e7f3ff;
  border: 1px solid #b3d7ff;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 0.9em;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shift-entry-details {
  flex-grow: 1;
}

.delete-shift {
  cursor: pointer;
  color: #ff4d4d;
  font-weight: bold;
  padding: 0 5px;
  font-size: 1.1em;
  margin-left: 8px;
}

.delete-shift:hover {
  color: #cc0000;
}

.controls {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#company-name-display {
  font-size: 0.7em;
  color: #007bff;
  font-weight: 500;
  margin-left: 5px;
  padding-left: 8px;
  border-left: 1px solid #ccc;
  vertical-align: middle;
}

/* Form Styling */
form {
  max-width: 500px;
  margin: 2em auto;
  padding: 1.5em;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
}

form div {
  margin-bottom: 1em;
}

form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: bold;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="tel"] {
  width: 100%;
  padding: 0.8em;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button[type="submit"] {
  padding: 0.8em 1.5em;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
}

form button[type="submit"]:hover {
  background-color: #0056b3;
}

/* Messages */
.message {
  padding: 0.8em;
  margin-top: 1em;
  border-radius: 4px;
  text-align: center;
}
.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Staff List */
#staff-list {
  list-style: none;
  padding: 0;
}

#staff-list li {
  background-color: #fff;
  border: 1px solid #eee;
  padding: 1em;
  margin-bottom: 0.5em;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#staff-list li span {
  flex-grow: 1;
}

.remove-staff-btn {
  padding: 0.5em 1em;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 1em;
}

.remove-staff-btn:hover {
  background-color: #c82333;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.toast {
  background-color: #333;
  color: #fff;
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 10px;
  min-width: 250px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0.95;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  transform: translateX(100%);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background-color: #28a745;
}

.toast.error {
  background-color: #dc3545;
}

.toast.info {
  background-color: #17a2b8;
}

.toast.warning {
  background-color: #ffc107;
  color: #333;
}

/* Buttons */
.toggle-button {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 15px;
  font-size: 1em;
}

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

.edit-staff-btn,
.delete-staff-btn {
  padding: 5px 10px;
  margin-right: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

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

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

/* Schedule Cell Variants */
.schedule-cell.time-off-day {
  background-color: #f0f0f0;
}

.schedule-cell.annual-leave {
  background-color: #d4edda;
}

.schedule-cell.sick-leave {
  background-color: #f8d7da;
}

.schedule-cell.unpaid-leave {
  background-color: #fff3cd;
}

.schedule-cell.public-holiday {
  background-color: #d1ecf1;
  font-weight: bold;
}

.time-off-indicator {
  font-size: 0.7em;
  color: #555;
  text-align: center;
  margin-top: 5px;
  display: block;
}

.schedule-cell {
  position: relative;
}

.hidden-section {
  display: none;
}

.staff-name-cell {
  position: sticky;
  left: 0;
  background: white;
  z-index: 2;
  border-right: 1px solid #ddd;
  min-width: 100px;
}

.shift-entry {
  margin: 2px 0;
  padding: 4px;
  background: #f8f8f8;
  border-radius: 3px;
}

.shift-entry-details {
  font-size: 0.9em;
}

.delete-shift {
  float: right;
  cursor: pointer;
  color: #999;
}

.delete-shift:hover {
  color: #d33;
}
