/* Improve visibility of the Join Course button on light backgrounds */
#join-course-btn {
  border-width: 2px;
}
#join-course-btn i {
  vertical-align: middle;
}

/* Keep spacing between join/create buttons consistent */
.btn-group #join-course-btn {
  margin-right: 0.5rem;
}
/* General Body Style */
body {
  background-color: var(--aisi-bg, #f8fafc);
  /* font-family: "Noto Sans TC", sans-serif; */
  
  /* Language loading state - content hidden until language is ready */
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

body.lang-ready {
  opacity: 1;
}

/* Navbar Customization */
.aisi-accent-background {
  background-color: var(--aisi-primary, #5f849b);
}

/* Course Banner on course.html */
.course-banner {
  padding: 4rem 2rem;
  margin-bottom: 1rem;
  background-color: #6c757d; /* Fallback */
  background-size: cover;
  background-position: center;
  border-radius: 0;
  position: relative;
}

.course-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.course-banner .container {
  position: relative;
  z-index: 2;
}

/* Card Styles for Course List */
.course-card {
  border: 1px solid var(--aisi-border, #e0e6ed);
  border-radius: 1rem; /* 16px */
  background-color: var(--aisi-card, #ffffff);
  box-shadow: 0 2px 8px rgba(95, 132, 155, 0.08);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(95, 132, 155, 0.16);
}

.course-card .card-img-top {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  max-height: 180px;
  object-fit: cover;
}

.course-card .card-title a {
  text-decoration: none;
  color: inherit;
}

.course-card .card-title a:hover {
  color: var(--aisi-primary, #5f849b);
}

/* Announcement Card Style */
.announcement-card {
  background-color: #fff;
  border: 1px solid var(--aisi-border, #e0e6ed);
  border-radius: 0.75rem; /* 12px */
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.announcement-card .card-body {
  padding: 0;
}

.announcement-card .comment-section {
  border-top: 1px solid var(--aisi-border, #e0e6ed);
  margin-top: 1rem;
  padding-top: 1rem;
}

/* Enhanced announcement header styling for better hierarchy */
.announcement-card h6 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

.announcement-card .announcement-author {
  font-size: 1rem;
  font-weight: 500;
  color: #34495e;
  display: block;
  margin-bottom: 0.25rem;
}

.announcement-card .announcement-time {
  font-size: 0.875rem;
  color: #7f8c8d;
  margin-bottom: 1rem;
}

.announcement-card .announcement-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ecf0f1;
  color: #2c3e50;
}

/* Member Avatar Style */
.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* Assignment Submission Status */
.status-badge {
  font-size: 0.8em;
  padding: 0.4em 0.7em;
}

/* Enhanced announcement content styles */
.announcement-body {
  font-size: 1rem;
  line-height: 1.6;
}

.announcement-body h1,
.announcement-body h2,
.announcement-body h3,
.announcement-body h4,
.announcement-body h5,
.announcement-body h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.announcement-body p {
  margin-bottom: 0.75rem;
}

.announcement-body ul,
.announcement-body ol {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

.announcement-body blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #6c757d;
  font-style: italic;
}

.announcement-body code {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  color: #d63384;
}

.announcement-body pre {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
  padding: 0.75rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.announcement-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* Image toggle styles */
.image-toggle-container {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.image-preview {
  text-align: center;
  background: white;
  border-radius: 0.375rem;
  padding: 0.5rem;
  border: 1px solid #e9ecef;
}

.image-preview img {
  transition: transform 0.2s ease;
  cursor: pointer;
}

.image-preview img:hover {
  transform: scale(1.02);
}

/* Enhanced link styles */
.announcement-body a {
  color: #0d6efd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

.announcement-body a:hover {
  border-bottom-color: #0d6efd;
}

/* Table styles for Markdown tables */
.announcement-body table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.announcement-body table th,
.announcement-body table td {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  text-align: left;
}

.announcement-body table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Custom Navigation Tabs Styling */
.nav-tabs {
  border-bottom: 2px solid var(--aisi-border, #e0e6ed);
}

.nav-tabs .nav-link {
  color: #6c757d;
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
  color: var(--aisi-primary, #5f849b);
  background-color: rgba(95, 132, 155, 0.05);
  border-bottom-color: rgba(95, 132, 155, 0.3);
}

.nav-tabs .nav-link.active {
  color: var(--aisi-primary, #5f849b);
  background-color: transparent;
  border-bottom-color: var(--aisi-primary, #5f849b);
  font-weight: 600;
}

.nav-tabs .nav-link:focus {
  box-shadow: none;
  outline: none;
}

/* Enhanced tab content styling */
.tab-content {
  background-color: var(--aisi-card, #ffffff);
  border: 1px solid var(--aisi-border, #e0e6ed);
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: 0 2px 8px rgba(95, 132, 155, 0.08);
}

.tab-pane {
  padding: 2rem;
}

/* Filter Segmented Control Styles */
.filter-segmented-control {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-segmented-control .btn {
  border-radius: 0;
  transition: all 0.2s ease;
}

.filter-segmented-control .btn:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.filter-segmented-control .btn:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Batch Selection Styles */
.announcement-selected {
  background-color: #e3f2fd !important;
  border-color: #2196f3 !important;
}

.announcement-card .form-check-input {
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
}

/* Deleted Items Styles */
.announcement-deleted,
.assignment-deleted {
  opacity: 0.7;
  background-color: #f8f9fa !important;
  border-left: 4px solid #6c757d !important;
}

.announcement-deleted .announcement-body,
.assignment-deleted .card-text {
  color: #6c757d;
}

/* Batch Mode Button Styles */
.btn-outline-secondary:hover {
  background-color: var(--aisi-primary, #5f849b);
  border-color: var(--aisi-primary, #5f849b);
  color: white;
}

/* Assignment Accordion Styles */
.assignment-accordion {
  margin: 0;
  border: 1px solid #e0e6ed;
  border-radius: 0.5rem;
  overflow: hidden;
}

.assignment-accordion .accordion-item {
  background-color: #f8f9fa;
  border: none;
}

.assignment-accordion .accordion-button {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--aisi-primary, #5f849b);
  background-color: #f8f9fa;
  border: none;
  transition: all 0.3s ease;
}

.assignment-accordion .accordion-button:not(.collapsed) {
  background-color: #f0f4f8;
  color: var(--aisi-primary, #5f849b);
  box-shadow: none;
}

.assignment-accordion .accordion-button:hover {
  background-color: #f0f4f8;
}

.assignment-accordion .accordion-button::after {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.assignment-accordion .accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}

.assignment-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

.assignment-accordion .accordion-collapse {
  transition: all 0.3s ease;
}

.assignment-description-body {
  padding: 1rem 1.25rem;
  background-color: #ffffff;
  line-height: 1.6;
  color: #333;
}

.assignment-description-body p {
  margin-bottom: 0.5rem;
}

.assignment-description-body p:last-child {
  margin-bottom: 0;
}
