/* Shared button style */
.student-activities .btn, .teacher-courses-edit .btn {
    display: inline-block;
    padding: 6px 14px;
    margin: 2px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
  }
  
  /* Hover animation */
  .student-activities .btn:hover, .teacher-courses-edit .btn:hover {
    transform: scale(1.05);
  }
  
  /* Specific styles */
  .student-activities .btn-edit, .teacher-courses-edit .btn-edit {
    background-color: #1976d2;
    color: #fff;
  }
  .student-activities .btn-edit:hover, .teacher-courses-edit .btn-edit:hover {
    background-color: #1565c0;
  }
  
  .student-activities .btn-delete, .teacher-courses-edit .btn-delete {
    background-color: #c62828;
    color: #fff;
  }
  .student-activities .btn-delete:hover, .teacher-courses-edit .btn-delete:hover {
    background-color: #b71c1c;
  }
  
  .student-activities .btn-save, .teacher-courses-edit .btn-save {
    background-color: #2e7d32;
    color: #fff;
  }
  .student-activities .btn-save:hover, .teacher-courses-edit .btn-save:hover {
    background-color: #1b5e20;
  }
  
  .student-activities input[type="text"],
  .teacher-courses-edit input[type="text"],
.student-activities textarea,
.teacher-courses-edit textarea,
.student-activities input[type="file"],
.teacher-courses-edit input[type="file"] {
  width: 95%;             /* keep them narrow, not full width */
  padding: 4px 6px;
  margin: 0;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: inline-block;   /* ensures they stay inline */
  vertical-align: middle;  /* aligns with other text */
  background: #fff;        /* remove grey WPBakery styling */
  box-shadow: none;
}

/* Make textarea smaller */
.student-activities textarea,
.teacher-courses-edit textarea {
  height: 40px; /* one line tall */
  resize: vertical; /* still allow manual resize */
}

/* Table styling for better alignment */
.student-activities td,
.teacher-courses-edit td {
  vertical-align: middle;
  padding: 6px 10px;
}

.course-link {
  color: #0073aa;
  text-decoration: none;
  font-weight: bold;
}

.course-link:hover {
  color: #005a87;
  text-decoration: underline;
}



.teacher-courses-accordion {
  margin: 20px 0;
}
.accordion-header {
  margin: 0;
}
.accordion-toggle {
  width: 100%;
  text-align: left;
  padding: 10px;
  font-size: 16px;
  background: #f1f1f1;
  border: none;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}
.accordion-toggle:hover {
  background: #e2e2e2;
}
.accordion-content {
  padding: 10px;
  border: 1px solid #ddd;
  border-top: none;
  background: #fff;
}


/**** course page ****/

    .course-details {
      /* max-width: 800px; */
      /* margin: 20px auto; */
      /* padding: 20px; */
      /* background: #fff; */
      /* border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
  }
  
  .course-header {
      border-bottom: 2px solid #0073aa;
      padding-bottom: 20px;
      /* margin-bottom: 30px; */
  }
  
  .course-header h2 {
      color: #0073aa;
      margin-bottom: 10px;
  }
  
  .course-section {
      margin-bottom: 25px;
      padding: 15px;
      background: #fff;
      border-radius: 5px;
  }
  
  .course-section h3 {
      color: #333;
      margin-bottom: 10px;
      border-bottom: 1px solid #ddd;
      padding-bottom: 5px;
  }
  
  .course-section p {
      line-height: 1.6;
      margin: 0;
  }
  
  .course-actions {
      text-align: center;
      margin-top: 30px;
      padding-top: 20px;
      /* border-top: 1px solid #ddd; */
  }
  
/* Course Cards Layout */
.courses-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.course-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.course-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.course-title h3 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 20px;
    font-weight: 600;
}

.course-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.course-delivered.delivered {
    color: #2e7d32;
    background: #e8f5e8;
    border-color: #4caf50;
}

.course-delivered.not-delivered {
    color: #f57c00;
    background: #fff3e0;
    border-color: #ff9800;
}

.course-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.course-details {
    padding: 20px;
}

.course-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fafafa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.course-section:last-child {
    margin-bottom: 0;
}

.course-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.course-section p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.course-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.course-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.course-field label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.course-field span {
    color: #555;
    font-size: 14px;
}

/* Edit mode styles */
.course-title-input {
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    padding: 8px 12px;
    border: 2px solid #0073aa;
    border-radius: 4px;
    background: #fff;
}

.course-meta-input {
    width: 120px;
    padding: 4px 8px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.course-field-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.course-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

/* Cancel button style */
.btn-cancel {
    background-color: #757575;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #616161;
}

/* Course details hidden by default */
.course-details {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Smooth transition when showing details */
.course-card {
    transition: all 0.3s ease;
}

/* Ensure course cards look clean when collapsed */
.course-card .course-header {
    border-bottom: none;
}

.course-card:not(.editing) .course-header {
    border-bottom: 1px solid #e0e0e0;
}

/* Edit mode styling */
.course-card.editing .course-header {
    border-bottom: 1px solid #e0e0e0;
}

/* Make sure the layout is clean when collapsed */
.courses-container .course-card {
    margin-bottom: 15px;
}

.course-card .course-header {
    padding: 15px 20px;
}

/* Responsive adjustments for the collapsed view */
@media (max-width: 768px) {
    .course-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .course-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Print styles */
@media print {
    /* Hide top menu */
    header,
    nav,
    .main-navigation,
    .site-header,
    #header,
    #navigation,
    #top-menu,
    .top-menu {
        display: none !important;
    }
    
    /* Hide footer */
    footer,
    .site-footer,
    #footer,
    .footer {
        display: none !important;
    }
    
    /* Hide elements with class .vc_column-inner */
    .vc_column-inner {
        display: none !important;
    }
    
    /* Hide Actions column from all tables */
    table th.actions,
    table td.actions,
    table .actions {
        display: none !important;
    }
    
    /* Hide element with id ongoing-courses-container */
    #ongoing-courses-container {
        display: none !important;
    }
    
    /* Additional print optimizations */
    body {
        margin: 0;
        padding: 20px;
    }
    
    /* Ensure tables print properly */
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    thead {
        display: table-header-group;
    }
    
    tfoot {
        display: table-footer-group;
    }
}
  