/* ==================== */
/* General Styles       */
/* ==================== */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
  transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
  background-color: #2c2c2c;
  color: #f4f4f4;
}

/* Container for all pages */
.container {
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
  margin-bottom: 50px;
  transition: background-color 0.3s, color 0.3s;
}

.dark-mode .container {
  background-color: #3c3c3c;
  color: #f4f4f4;
}

/* Header styling for all pages */
.header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: white;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, color 0.3s;
}

.dark-mode .header {
  background-color: #3c3c3c;
  color: #f4f4f4;
}

/* Dark mode body */
body.dark-mode {
  background-color: #1a1a1a;
}

/* Dark mode toggle button */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.dark-mode-toggle:hover {
  background-color: #f0f0f0;
}

/* ==================== */
/* Index Page           */
/* ==================== */
/* Search bar */
.search-bar input {
  padding: 12px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
  min-width: 250px;
  margin-bottom: 20px;
}

/* Links section */
.links-section {
  margin-top: 30px;
}

.links-list {
  list-style: none;
  padding: 0;
}

.link-item {
  margin-bottom: 10px;
}

.link {
  font-size: 18px;
  text-decoration: none;
  color: #007bff;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
  display: block;
}

.link:hover {
  background-color: #f4f4f4;
  color: #0056b3;
}

.dark-mode .link {
  color: #4e90ff;
}

.dark-mode .link:hover {
  background-color: #555;
  color: #fff;
}

/* Table styling */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.table th {
  background-color: #007bff;
  color: white;
}

.table tr:hover {
  background-color: #f5f5f5;
}

.dark-mode .table th {
  background-color: #3c3c3c;
}

.dark-mode .table tr:hover {
  background-color: #555;
}

/* ==================== */
/* Meeting Planner Page */
/* ==================== */
#meeting-planner-form {
  margin-bottom: 20px;
}

#meeting-planner-form .form-label {
  font-weight: bold;
  margin-bottom: 5px;
}

#meeting-planner-form .form-control,
#meeting-planner-form .form-select {
  padding: 10px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
  margin-bottom: 15px;
}

#meeting-results {
  margin-top: 20px;
}

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

#meeting-results th,
#meeting-results td {
  padding: 10px;
  border: 1px solid #ddd;
}

/* ==================== */
/* World Clock Page     */
/* ==================== */
.timezone-selector {
  margin-bottom: 20px;
}

.timezone-selector label {
  font-weight: bold;
  margin-bottom: 5px;
}

.timezone-selector select {
  padding: 10px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
  margin-bottom: 15px;
}

.clock-item {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.clock-item h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.clock-item .time {
  font-size: 20px;
  font-weight: bold;
}

.clock-item .timezone {
  font-size: 16px;
  color: #666;
}

.dark-mode .clock-item {
  background-color: #3c3c3c;
  color: #f4f4f4;
}

/* ==================== */
/* Timezone Alerts Page */
/* ==================== */
.timezone-alerts {
  margin-top: 20px;
}

.timezone-alert {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timezone-alert h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.timezone-alert ul {
  padding-left: 20px;
}

.timezone-alert li {
  margin-bottom: 10px;
}

.dark-mode .timezone-alert {
  background-color: #3c3c3c;
  color: #f4f4f4;
}

/* Example CSS for the alerts */
.alert-dst {
    color: #f39c12;
    background-color: #f9e79f;
}

.alert-legal {
    color: #2980b9;
    background-color: #d5e6f0;
}

.alert {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 16px;
}

/* ==================== */
/* Responsive Design    */
/* ==================== */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 10px;
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 0.85rem;
  }

  .clock-item h2 {
    font-size: 20px;
  }

  .clock-item .time {
    font-size: 18px;
  }
  
  /* Improved mobile table scrolling */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  .table-responsive table {
    font-size: 0.8rem;
  }
  
  .table-responsive th,
  .table-responsive td {
    white-space: nowrap;
    min-width: 80px;
  }
  
  .table-responsive th:first-child,
  .table-responsive td:first-child {
    position: sticky;
    left: 0;
    background-color: inherit;
    z-index: 10;
  }
  
  .dark-mode .table-responsive th:first-child,
  .dark-mode .table-responsive td:first-child {
    background-color: #2d2d2d;
  }
  
  .table-responsive thead th:first-child {
    z-index: 20;
  }
  
  /* Mobile-friendly buttons */
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* Hide non-essential columns on very small screens */
  @media (max-width: 576px) {
    .hide-on-mobile {
      display: none !important;
    }
  }
}
