/* SPDX-FileCopyrightText: 2024 NOI Techpark <digital@noi.bz.it>

SPDX-License-Identifier: CC0-1.0  */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  background-color: #010d01;
  color: white;
  text-align: center;
  padding: 1rem;
}

main {
  padding: 1rem;
  overflow-x: auto;
}

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

#calendar-table th,
#calendar-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  width: 150px; /* Set a fixed width for all columns */
}
/* Specific rule for the first column (time column) */
#calendar-table th:first-child,
#calendar-table td:first-child {
  width: 80px; /* Set a smaller width for the time column */
}

/* Time column styling */
.time-slot {
  font-weight: bold;
  background-color: #f0f0f0;
  width: 80px;
  text-align: center;
}

.heating {
  position: absolute; /* Positioned relative to .event-cell */
  top: 0; /* Start at the top of the .event-cell */
  left: 50%; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width of the .event-cell */
  height: 100%; /* Example height to show partial filling */
  background-color: #b22222;
  box-sizing: border-box;
  font-weight: bold; /* Make text bold */
  padding: 6px; /* Add padding for better spacing */
  color: white; /* Ensure text is readable on the background */
  border-radius: 4px; /* Rounded corners for a modern look */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
  overflow: hidden; /* Ensure text doesn't overflow */
  white-space: nowrap; /* Prevent text from wrapping */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  z-index: 1;
}

.heating-start-30 {
  position: absolute; /* Positioned relative to .event-cell */
  top: 50%; /* Start at the top of the .event-cell */
  left: 50%; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width of the .event-cell */
  height: 50%; /* Example height to show partial filling */
  background-color: #b22222;
  box-sizing: border-box;
  font-weight: bold; /* Make text bold */
  padding: 6px; /* Add padding for better spacing */
  color: white; /* Ensure text is readable on the background */
  border-radius: 4px; /* Rounded corners for a modern look */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
  overflow: hidden; /* Ensure text doesn't overflow */
  white-space: nowrap; /* Prevent text from wrapping */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  z-index: 1;
}

.heating-end-30 {
  position: absolute; /* Positioned relative to .event-cell */
  top: 0; /* Start at the top of the .event-cell */
  left: 50%; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width of the .event-cell */
  height: 50%; /* Example height to show partial filling */
  background-color: #b22222;
  box-sizing: border-box;
  font-weight: bold; /* Make text bold */
  padding: 6px; /* Add padding for better spacing */
  color: white; /* Ensure text is readable on the background */
  border-radius: 4px; /* Rounded corners for a modern look */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
  overflow: hidden; /* Ensure text doesn't overflow */
  white-space: nowrap; /* Prevent text from wrapping */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  z-index: 1;
}

.event-cell {
  position: relative; /* Establishes a positioning context for the .event */
  width: 200px; /* Example width */
  height: 60px; /* Example height */
  border: 1px solid #ddd;
}

.event {
  position: absolute; /* Positioned relative to .event-cell */
  top: 0; /* Start at the top of the .event-cell */
  left: 0; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width o5the .event-cell */
  height: 100%; /* Example height to show partial filling */
  background-color: #e6f3ff;
  padding: 4px;
  box-sizing: border-box;
}

.event-start-0 {
  position: absolute; /* Positioned relative to .event-cell */
  top: 0; /* Start at the top of the .event-cell */
  left: 0; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width o5the .event-cell */
  height: 100%; /* Example height to show partial filling */
  background-color: #e6f3ff;
  padding: 4px;
  box-sizing: border-box;
}

.event-start-30 {
  position: absolute; /* Positioned relative to .event-cell */
  top: 50%; /* Start at the top of the .event-cell */
  left: 0; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width o5the .event-cell */
  height: 50%; /* Example height to show partial filling */
  background-color: #e6f3ff;
  padding: 4px;
  box-sizing: border-box;
}

.event-end-0 {
  position: absolute; /* Positioned relative to .event-cell */
  top: 0; /* Start at the top of the .event-cell */
  left: 0; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width o5the .event-cell */
  height: 100%; /* Example height to show partial filling */
  background-color: #e6f3ff;
  padding: 4px;
  box-sizing: border-box;
}

.event-end-30 {
  position: absolute; /* Positioned relative to .event-cell */
  top: 0;
  left: 0; /* Start at the left of the .event-cell */
  width: 50%; /* Span the full width o5the .event-cell */
  height: 50%; /* Example height to show partial filling */
  background-color: #e6f3ff;
  padding: 4px;
  box-sizing: border-box;
}
.schedule-cell {
  cursor: pointer;
  min-width: 100px;
  border: 1px solid #ddd;
  position: relative;
  height: 30px;
  /* Set a specific height for the cells */
}

.event-start-0::after{
  --tooltipScale: 0;

  content:attr(title);
  position: absolute;
  top: -1.75rem;
  left: 0;
  transform: scale(var(--tooltipScale));
  transform-origin: bottom left;
}

.event-start-0:hover::after{
  --tooltipScale: 1;
}
/* Base style for event text */
/* Base style for event text */
.event,
.event-start-0,
.event-start-30,
.event-end-0,
.event-end-30 {
  font-weight: bold; /* Make text bold */
  padding: 6px; /* Add padding for better spacing */
  background-color: #0078d4; /* Use a vibrant color similar to Outlook */
  color: white; /* Ensure text is readable on the background */
  border: 1px solid #005a9e; /* Add a border for definition */
  border-radius: 4px; /* Rounded corners for a modern look */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
  overflow: hidden; /* Ensure text doesn't overflow */
  white-space: nowrap; /* Prevent text from wrapping */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  z-index: 1;
}

.schedule-cell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-bottom: 1px dashed #ddd;
  pointer-events: none;
  z-index: 0; /* Ensures the line doesn't interfere with clicks */
}
.hover-div {
  position: relative;
}

.hover-div::after {
  content: "Text that appears on hover";
  position: absolute;
  top: 100%;
  left: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-div:hover::after {
  visibility: visible;
  opacity: 1;
}
.redirect-button {
  padding: 10px 20px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.redirect-button:hover {
  background-color: #5a6268;
}

/* Actions Page Styles */
.actions-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
}

.action-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  padding: 20px;
  border-left: 4px solid #007bff;
}

.action-card h2 {
  margin: 0 0 10px 0;
  color: #333;
}

.action-time {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.action-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.action-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

.action-item:last-child {
  border-bottom: none;
}

.action-status {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.action-status label {
  margin-left: 8px;
  color: #666;
}

.back-button {
  padding: 8px 16px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 10px 0;
}

.back-button:hover {
  background-color: #5a6268;
}

@media (max-width: 768px) {
  #calendar-table {
    font-size: 14px;
  }
  #calendar-table th,
  #calendar-table td {
    width: auto; /* Allow columns to adjust on smaller screens */
  }
}

/* Date Navigation Container */
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 15px;
}

/* Navigation Buttons (Previous and Next Day) */
#prevDay,
#nextDay {
  background-color: #6c757d;
  border: 1px solid #ddd;
  color: white;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

#prevDay:hover,
#nextDay:hover {
  background-color: #5a6268;
  border-color: #bbb;
}

#prevDay:active,
#nextDay:active {
  transform: scale(0.98);
}

/* Current Date Heading */
#current-date {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  min-width: 200px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 600px) {
  .date-navigation {
      gap: 10px;
      padding: 10px;
  }

  #prevDay,
  #nextDay {
      padding: 6px 12px;
      font-size: 12px;
  }

  #current-date {
      font-size: 1rem;
      min-width: 150px;
  }
}