/* NotesGallery Shared Content CSS V12 */
/* Focus: Mobile notes table button size fix + stable related buttons */

/* 1. Shared Table Styles */
.notesgallery-table-wrapper {
  overflow-x: auto;
  margin: 25px 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  background: #ffffff;
}

.notesgallery-pyq-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', Arial, sans-serif;
  text-align: left;
  background: #ffffff;
}

.notesgallery-pyq-table th {
  background-color: #f8fafc;
  color: #1f2937;
  font-weight: 700;
  padding: 16px 18px;
  border-bottom: 1px solid #dbe3ee;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.notesgallery-pyq-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 18px;
  color: #374151;
  font-size: 15px;
  vertical-align: middle;
}

.notesgallery-pyq-table tr:last-child td {
  border-bottom: none;
}

.notesgallery-pyq-table tr:hover {
  background-color: #f9fbff;
}

.notesgallery-pyq-table th:first-child,
.notesgallery-pyq-table td:first-child {
  white-space: normal;
}

/* 1.5 Extracted Source Table Styles */
.notesgallery-source-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.notesgallery-source-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}

/* 2. Notes PDF Buttons - General */
.notesgallery-notes-pdf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.notesgallery-notes-pdf-links > br {
  display: none !important;
}

.notesgallery-notes-pdf-cell {
  display: inline-block;
  margin: 0;
}

.notesgallery-notes-pdf-button,
.notesgallery-notes-pdf-button:link,
.notesgallery-notes-pdf-button:visited {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 42px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #2563eb;
  background: #ffffff;
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  box-sizing: border-box;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.notesgallery-notes-pdf-button span,
.notesgallery-notes-pdf-button strong,
.notesgallery-notes-pdf-button em {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}

.notesgallery-notes-pdf-button:hover,
.notesgallery-notes-pdf-button:focus,
.notesgallery-notes-pdf-button:active {
  background: #eff6ff;
  border-color: #1d4ed8;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

/* 2.5 Notes Table Specific Overrides */
.notesgallery-notes-table td:last-child,
.notesgallery-notes-table th:last-child {
  text-align: center;
}

.notesgallery-notes-table .notesgallery-notes-pdf-links {
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 !important;
}

.notesgallery-notes-table .notesgallery-notes-pdf-cell {
  display: inline-block !important;
}

.notesgallery-notes-table .notesgallery-notes-pdf-button {
  min-width: 84px;
  height: 42px;
  padding: 8px 14px;
}

/* 3. Related Materials */
.notesgallery-related-materials {
  margin: 32px 0;
}

.notesgallery-related-heading {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
}

.notesgallery-related-hub-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 18px;
  align-items: stretch;
}

.notesgallery-related-materials a.notesgallery-related-button {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 18px 20px;
  box-sizing: border-box;
  border-radius: 12px;
  text-decoration: none !important;
  overflow: hidden;
  border: 1px solid #d7dee8;
  background: #f8fafc;
  font-weight: 650;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  color: #1d4ed8 !important;
}

.notesgallery-related-materials a.notesgallery-related-button > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #1d4ed8 !important;
}

.notesgallery-related-materials a.notesgallery-related-button > span:last-child {
  flex: 0 0 auto;
}

.notesgallery-related-arrow {
  color: #1e40af !important;
  font-size: 18px;
  line-height: 1;
}

.notesgallery-related-materials a.notesgallery-related-button:hover,
.notesgallery-related-materials a.notesgallery-related-button:focus {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
  color: #1e40af !important;
}

.notesgallery-related-materials a.notesgallery-related-button:hover > span:first-child,
.notesgallery-related-materials a.notesgallery-related-button:focus > span:first-child {
  color: #1e40af !important;
}

.notesgallery-related-materials a.notesgallery-related-button:hover .notesgallery-related-arrow,
.notesgallery-related-materials a.notesgallery-related-button:focus .notesgallery-related-arrow {
  color: #1d4ed8 !important;
}

/* 4. Responsive Fixes */
@media (max-width: 900px) {
  .notesgallery-related-hub-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .notesgallery-pyq-table th {
    padding: 12px 14px;
    font-size: 13px;
  }

  .notesgallery-pyq-table td {
    padding: 12px 14px;
    font-size: 14px;
  }

  .notesgallery-notes-table .notesgallery-notes-pdf-links {
    gap: 8px;
    justify-content: center;
  }

  .notesgallery-notes-pdf-button,
  .notesgallery-notes-pdf-button:link,
  .notesgallery-notes-pdf-button:visited,
  .notesgallery-notes-table .notesgallery-notes-pdf-button {
    min-width: 78px;
    height: 40px;
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 10px;
  }

  .notesgallery-related-hub-buttons {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .notesgallery-related-materials a.notesgallery-related-button {
    min-height: 80px;
    padding: 16px 18px;
  }
}

@media (max-width: 400px) {
  .notesgallery-notes-pdf-button,
  .notesgallery-notes-pdf-button:link,
  .notesgallery-notes-pdf-button:visited,
  .notesgallery-notes-table .notesgallery-notes-pdf-button {
    min-width: 72px;
    height: 40px;
    padding: 7px 10px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .notesgallery-pyq-table th,
  .notesgallery-pyq-table td {
    padding: 10px 10px;
  }

  .notesgallery-notes-pdf-button,
  .notesgallery-notes-pdf-button:link,
  .notesgallery-notes-pdf-button:visited,
  .notesgallery-notes-table .notesgallery-notes-pdf-button {
    min-width: 68px;
    height: 38px;
    padding: 6px 8px;
    font-size: 12px;
  }
}

/* 5. AKTU Syllabus Table — Base/Desktop */
.notesgallery-table-wrapper.notesgallery-syllabus-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

table.notesgallery-pyq-table.notesgallery-syllabus-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse;
}

table.notesgallery-pyq-table.notesgallery-syllabus-table th,
table.notesgallery-pyq-table.notesgallery-syllabus-table td {
  box-sizing: border-box;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-wrap: break-word !important;
  word-break: normal !important;
}

table.notesgallery-pyq-table.notesgallery-syllabus-table th:first-child,
table.notesgallery-pyq-table.notesgallery-syllabus-table td:first-child {
  width: 70% !important;
  max-width: 70% !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-wrap: break-word !important;
  word-break: normal !important;
}

table.notesgallery-pyq-table.notesgallery-syllabus-table th:last-child,
table.notesgallery-pyq-table.notesgallery-syllabus-table td:last-child {
  width: 30% !important;
  max-width: 30% !important;
  min-width: 0 !important;
  text-align: center;
}

table.notesgallery-pyq-table.notesgallery-syllabus-table a.notesgallery-download-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-width: 120px;
  min-height: 40px;
  padding: 9px 16px;
  box-sizing: border-box;
  background: #2563eb !important;
  border: 1px solid #2563eb !important;
  border-radius: 8px;
  color: #ffffff !important;
  text-decoration: none !important;
  text-align: center;
  font-weight: 600;
  line-height: 1.2;
  white-space: normal !important;
}

table.notesgallery-pyq-table.notesgallery-syllabus-table a.notesgallery-download-btn:hover,
table.notesgallery-pyq-table.notesgallery-syllabus-table a.notesgallery-download-btn:focus {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* AKTU Syllabus Table — Mobile */
@media (max-width: 640px) {
  table.notesgallery-pyq-table.notesgallery-syllabus-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }

  table.notesgallery-pyq-table.notesgallery-syllabus-table th,
  table.notesgallery-pyq-table.notesgallery-syllabus-table td {
    padding: 10px 8px;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  table.notesgallery-pyq-table.notesgallery-syllabus-table th:first-child,
  table.notesgallery-pyq-table.notesgallery-syllabus-table td:first-child {
    width: 65% !important;
    max-width: 65% !important;
  }

  table.notesgallery-pyq-table.notesgallery-syllabus-table th:last-child,
  table.notesgallery-pyq-table.notesgallery-syllabus-table td:last-child {
    width: 35% !important;
    max-width: 35% !important;
    text-align: center;
  }

  table.notesgallery-pyq-table.notesgallery-syllabus-table a.notesgallery-download-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 38px;
    padding: 8px 6px;
  }
}

@media (max-width: 360px) {
  table.notesgallery-pyq-table.notesgallery-syllabus-table th,
  table.notesgallery-pyq-table.notesgallery-syllabus-table td {
    padding: 8px 6px;
  }
}

/* 6. Career Posts */
.notesgallery-career-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.notesgallery-career-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', Arial, sans-serif;
  text-align: left;
  background: #ffffff;
  table-layout: fixed;
}

.notesgallery-career-table th,
.notesgallery-career-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 15px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.notesgallery-career-table tr:last-child td {
  border-bottom: none;
}

.notesgallery-career-table tr:hover {
  background-color: #f9fafb;
}

.notesgallery-career-table td:first-child {
  width: 35%;
  font-weight: 600;
  color: #374151;
  background-color: #f8fafc;
}

.notesgallery-career-table td:last-child {
  width: 65%;
}

.notesgallery-career-apply {
  margin: 32px 0;
  text-align: center;
}

.notesgallery-career-apply-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #2563eb;
  color: #ffffff !important;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.notesgallery-career-apply-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
}

.notesgallery-career-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notesgallery-career-links li a {
  display: block;
  padding: 12px 16px;
  background-color: #f3f4f6;
  color: #1e40af !important;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
  overflow-wrap: break-word;
  word-break: break-word;
}

.notesgallery-career-links li a:hover {
  background-color: #e5e7eb;
}

/* Career Responsive */
@media (max-width: 640px) {
  .notesgallery-career-table td {
    padding: 10px 12px;
    font-size: 14px;
  }

  .notesgallery-career-table td:first-child {
    width: 40%;
  }

  .notesgallery-career-table td:last-child {
    width: 60%;
  }
}

@media (max-width: 430px) {
  .notesgallery-career-table td {
    padding: 8px 10px;
    font-size: 13px;
  }

  .notesgallery-career-table td:first-child {
    width: 45%;
  }

  .notesgallery-career-table td:last-child {
    width: 55%;
  }

  .notesgallery-career-apply-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
  }
}

@media (max-width: 320px) {
  .notesgallery-career-table td {
    font-size: 12px;
    padding: 6px 8px;
  }

  .notesgallery-career-links li a {
    font-size: 13px;
    padding: 10px 12px;
  }
}
