/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
  }
  
  /* Top-Right UI */
  #top-right-ui {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 103;
    user-select: none;
  }
  
  /* Save Button */
  #save-button {
    font-family: Rubik;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 10px;
    background-color: #0677BB;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 10px;
  }
  
  #save-button:hover {
    background-color: #055c92;
  }


  
  /* Lessons Dropdown */
  #lessons-dropdown {
    position: relative;
    overflow-x: none;
  }
  
  #lessons-button {
    font-family: Rubik;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 10px;
    background-color: #293144;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  #lessons-button:hover {
    background-color: #181d29;
  }
  
  #lessons-menu {
    font-family: Rubik;
    font-size: 15px;
    font-weight: 500;
    color: #212F52;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 750px;
    min-height: 100px;
    max-height: 550px; 
    display: none;
    flex-direction: column;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow-x: hidden;
    overflow-y: hidden;
    padding-bottom: 5px;
  }
  
  #tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
  
  }
  
  .tab {
    font-family: Rubik;
    font-size: 17px;
    font-weight: 800;
    color: #212F52;
    flex: 1;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    background-color: #f8f9fa;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
  }
  
  .tab.active {
    background-color: #0677BB;
    color: #fff;
  }
  
  .tab:hover {
    background-color: #212F52;
    color: white;
  }
  
  .tab-content {
    padding: 10px;
    font-size: 14;
    overflow-x: none;
  }

  #lesson-name{
    font-family: Rubik;
    font-size: 14px;
    font-weight: 500;
    color: #212F52;
    width: 95%;
  }
  #privacy{
    font-family: Rubik;
    font-size: 14px;
    font-weight: 500;
    color: #212F52;
  }
  #category{
    font-family: Rubik;
    font-size: 14px;
    font-weight: 500;
    color: #212F52;
    width: 95%;
  }
   #edit_category{
    font-family: Rubik;
    font-size: 14px;
    font-weight: 500;
    color: #212F52;
    width: 95%;
  }
  /* Save Lesson Button */
  #save-lesson-button {
    padding: 8px 16px;
    background-color: #0677BB;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
  }
  
  #save-lesson-button:hover {
    background-color: #293144;
  }
  
  
  /* Modal Styling */
  .modal {
    font-family: Rubik;
    font-size: 15px;
    font-weight: 500;
    color: #293144;
    display: none;
    position: fixed;
    z-index: 20;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 103;
  }
  
  .modal-content {
    font-family: Rubik;
    font-size: 15px;
    font-weight: 500;
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }
  
  .close:hover,
  .close:focus {
    color: #293144;
  }
  
  .modal-content h2 {
    margin-top: 0;
  }
  
  .modal-content label {
    display: block;
    margin-top: 10px;
  }
  
  .modal-content input[type="text"],
  .modal-content select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  .modal-content button[type="submit"] {
    margin-top: 20px;
    padding: 10px 20px;
    font-family: Rubik;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
    background-color: #0677BB;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .modal-content button[type="submit"]:hover {
    background-color: #293144;;
  }

  
  #editForm {
    display: flex;
    flex-direction: column;
  }
  
  #editForm label {
    margin-top: 10px;
  }
  
  #editForm input,
  #editForm select {
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  #editForm button {
    margin-top: 20px;
    padding: 10px;
    background-color: #0677BB;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
  }
  #editForm button:nth-of-type(2) {
    background-color: #bb060f;
  }

  #editForm button:nth-of-type(2):hover {
    background-color: #69060b;
  }

  #editLessonName{
    width: 95%;
    font-family: Rubik;
    font-size: 14px;
    font-weight: 500;
    color: #212F52;
  }
  #editPrivacyMode{
    width: 95%;
    font-family: Rubik;
    font-size: 14px;
    font-weight: 500;
    color: #212F52;
  }
  
  #editForm button:hover {
    background-color: #293144;
  }



#top-left-ui{
  position: absolute;
  top: 0;
  left: 0;
  margin-left: 15px;
  margin-top: 15px;
}
#loaded_lesson_name{
  font-family: Rubik;
  font-size: 35px;
  font-weight: 700;
  width: fit-content;
  max-width: 600px;
  color: #212F52;
}
#save-quick{
  display: none;
  margin-left: 20px;
  scale: 0.8;
}
#save-quick:hover{
  scale: 0.9;
}
#save-quick:active{
  scale: 0.8;
}

#info-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0677BB; /* Green background */
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-family: Rubik;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none; /* Prevent interaction */
  z-index: 1000;
  text-align: center;
}

#resume-prompt {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background-color: #e8f1fb;
  color: #0b4b7a;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: Rubik;
  font-size: 12px;
  border: 1px solid #c9e0f5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  width: 240px;
}

#resume-prompt.active {
  display: inline-flex;
}

#resume-prompt .prompt-actions {
  display: flex;
  gap: 6px;
}

#resume-prompt .prompt-btn {
  border: 1px solid #0b4b7a;
  background: white;
  color: #0b4b7a;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: Rubik;
  font-size: 11px;
  cursor: pointer;
}

#resume-prompt .prompt-btn:hover {
  background: #f4f8fd;
}




.search-container {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.search-box {
  flex: 1;
  padding: 6px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: white;
  transition: all 0.3s ease;
  font-family: inherit;
}

.search-box:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.filter-dropdown {
  padding: 6px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  font-family: inherit;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Table header container */
.table-container {
  border-radius: 16px 16px 0 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* Scrollable body container */
.scrollable-tbody {
  max-height: 350px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  display: block;
}
.scrollable-tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* Center text in category and date columns */
.lessons-table th:nth-child(2),
.lessons-table td:nth-child(2),
.lessons-table th:nth-child(3),
.lessons-table td:nth-child(3),
.lessons-table th:nth-child(4),
.lessons-table td:nth-child(4),
.lessons-table th:nth-child(5),
.lessons-table td:nth-child(5) {
  text-align: center;
}
.lessons-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
}
.lessons-table thead {
  display: table-header-group;
  width: 100%;
}

.lessons-table thead tr {
  display: table;
  table-layout: fixed;
  width: 100%; /* Subtract scrollbar width */
}

.lessons-table th,
.lessons-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
#lesson-buttons-all{
  display: flex;
  position: relative;
}

#resume-prompt-container {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
}
.lessons-table th {
  background: linear-gradient(135deg, #0677BB 0%, #3b82f6 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: none;
}

.lessons-table tbody tr {
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.lessons-table tbody tr:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.lessons-table tbody tr:last-child td {
  border-bottom: none;
}

/* Your updated column widths */
.lessons-table th:nth-child(1),
.lessons-table td:nth-child(1) { width: 47%; }

.lessons-table th:nth-child(2),
.lessons-table td:nth-child(2) { width: 19%; }

.lessons-table th:nth-child(3),
.lessons-table td:nth-child(3) { width: 17%; }

.lessons-table th:nth-child(4),
.lessons-table td:nth-child(4) { width: 17%; }

#community_table th:nth-child(1),
#community_table td:nth-child(1) { width: 45%; }
#community_table th:nth-child(2),
#community_table td:nth-child(2) { width: 18%; }
#community_table th:nth-child(3),
#community_table td:nth-child(3) { width: 16%; }
#community_table th:nth-child(4),
#community_table td:nth-child(4) { width: 12%; }
#community_table th:nth-child(5),
#community_table td:nth-child(5) { width: 12%; }

/* Action buttons overlay styling */
.actions {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(-280%);
  display: none;
  gap: 10px;
  z-index: 10;
}

.load-btn,
.edit-btn, 
.likes-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-family: Rubik;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.load-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.load-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

.likes-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
}

.likes-btn:hover {
  transform: translateY(-2px);
   box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.edit-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
}

.edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

/* Enhanced cell styling */
.lesson-name {
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
}

.category {
  font-weight: 500;
  color: white;
  background: rgba(112, 157, 228, 0.5);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-transform: uppercase;

}
.user{
   font-size: 10px;
}
.likes{
  font-size: 12px;
}
.privacy-status {
  font-weight: 500;
  font-size: 12px;
  color: #059669;
}

.date-saved {
  color: #64748b;
  font-size: 10px;
}

/* Custom scrollbar styling */
.scrollable-tbody::-webkit-scrollbar {
  width: 0px;
}

.scrollable-tbody::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.scrollable-tbody::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  border-radius: 4px;
}

.scrollable-tbody::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

