﻿.section-directory {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 90dvw;
  margin: auto;
  padding: 1.5rem 1rem;
}

/* directory tabs */

.directory-tabs {
  --tab-count: 4;
  display: flex;
  flex-direction: row;
  width: 100%;
  margin: 2.5rem auto 2rem auto;
  position: relative;
  background-color: #eaecf0;
  border-radius: 100px;
}

.directory-tabs::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 0;
  width: calc((100% / var(--tab-count)) - 0.5rem);
  height: calc(100% - 1rem);
  background-color: #ffffff;
  border-radius: 100px;
  transition: transform 0.3s ease;
}

/* Move slider based on active tab */
.directory-tabs:has(#examiner-tab.active-tab)::before {
  transform: translateX(0%);
}
.directory-tabs:has(#professional-tab.active-tab)::before {
  transform: translateX(100%);
}
.directory-tabs:has(#teacher-tab.active-tab)::before {
  transform: translateX(300%);
}
.directory-tabs:has(#specialist-tab.active-tab)::before {
  transform: translateX(200%);
}

.directory-tab {
  flex: 1;
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  position: relative;
  z-index: 1;
}

.active-tab {
  font-weight: bold;
  color: #333;
}
.directory-tab:not(.active-tab) {
  color: #666;
}

/* form controls */

.form-groups {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.5rem;
  margin: 2.5rem auto 4rem auto;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  color: var(--color-gray-700, #344054);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.form-control {
  background: url(../img/icons/search.svg) #fff no-repeat scroll 12px 13px;
  padding: 0.75rem 1rem !important;
  padding-left: 2.5rem !important;
  border-radius: 6rem !important;
  margin: 0 !important;
  border: 1px solid var(--color-gray-300, #d0d5dd);
  color: var(--color-gray-500, #667085);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
}

/* dropdown styles */
.form-select,
.form-select-custom {
  padding: 0.75rem 1.25rem;
  border-radius: 6rem;
  border: 1px solid var(--color-gray-300, #d0d5dd);
  background-color: #ffffff;
  color: var(--color-gray-500, #667085);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
}

.form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  display: block;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--bs-form-select-bg-img),
    var(--bs-form-select-bg-icon, none);
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select-custom span {
  overflow-x: scroll;
  scrollbar-width: none; /* For Firefox */
}

.form-select-custom span::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, and Opera */
}

/* dropdown containers */
#examiner-style-dropdown,
#examiner-exam-level-dropdown,
#examiner-state-dropdown,
#professional-style-dropdown,
#professional-exam-level-dropdown,
#professional-state-dropdown,
#teacher-style-dropdown,
#teacher-exam-level-dropdown,
#teacher-state-dropdown,
#specialist-style-dropdown,
#specialist-exam-level-dropdown,
#specialist-state-dropdown {
  position: absolute;
  z-index: 100;
  width: 100%;
}

/* dropdown items */
#examiner-style-dropdown [id^="examiner-"],
#examiner-exam-level-dropdown [id^="examiner-"],
#examiner-state-dropdown [id^="examiner-state-"],
#professional-style-dropdown [id^="professional-"],
#professional-exam-level-dropdown [id^="professional-"],
#professional-state-dropdown [id^="professional-state-"],
#teacher-style-dropdown [id^="teacher-"],
#teacher-exam-level-dropdown [id^="teacher-"],
#teacher-state-dropdown [id^="teacher-state-"],
#specialist-style-dropdown [id^="specialist-"],
#specialist-exam-level-dropdown [id^="specialist-"],
#specialist-state-dropdown [id^="specialist-state-"] {
  cursor: pointer;
}

/* hover states for dropdown items */
#examiner-style-dropdown [id^="examiner-"]:hover,
#examiner-exam-level-dropdown [id^="examiner-"]:hover,
#examiner-state-dropdown [id^="examiner-state-"]:hover,
#professional-style-dropdown [id^="professional-"]:hover,
#professional-exam-level-dropdown [id^="professional-"]:hover,
#professional-state-dropdown [id^="professional-state-"]:hover,
#teacher-style-dropdown [id^="teacher-"]:hover,
#teacher-exam-level-dropdown [id^="teacher-"]:hover,
#teacher-state-dropdown [id^="teacher-state-"]:hover,
#specialist-style-dropdown [id^="specialist-"]:hover,
#specialist-exam-level-dropdown [id^="specialist-"]:hover,
#specialist-state-dropdown [id^="specialist-state-"]:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* Fix dropdown display - peer classes */
.peer[aria-expanded="true"] + .peer-aria-expanded\:block {
  display: block !important;
}

.peer[aria-expanded="true"] + .peer-aria-expanded\:grid {
  display: grid !important;
}

/* common card styles */

/* Card layout containers */
.examiner-cards,
.professional-cards,
.teacher-cards,
.specialist-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 2rem;
  align-items: stretch;
}

/* Basic card structure */
.examiner-card,
.professional-card,
.teacher-card,
.specialist-card {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 0.25rem;
  box-sizing: border-box;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Card visibility states */
.examiner-card[style*="display: none"],
.professional-card[style*="display: none"],
.teacher-card[style*="display: none"],
.specialist-card[style*="display: none"] {
  display: none !important;
  grid-column: unset !important;
  grid-row: unset !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.examiner-card[style*="display: flex"],
.professional-card[style*="display: flex"],
.teacher-card[style*="display: flex"],
.specialist-card[style*="display: flex"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#professional-section[style="display: block"]
  .professional-cards
  .professional-card {
  display: flex !important;
}
#specialist-section[style="display: block"]
  .specialist-cards
  .specialist-card {
  display: flex !important;
}

/* examiner card styles */
.examiner-card,
.professional-card,
.teacher-card,
.specialist-card {
  background-color: #d0d5dd;
  border-radius: 16px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: -2px;
}

.examiner-card-details,
.professional-card-details,
.teacher-card-details,
.specialist-card-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  gap: 1rem;
}

.examiner-card-header,
.professional-card-header,
.teacher-card-header,
.specialist-card-header {
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.examiner-card-avatar,
.professional-card-avatar,
.teacher-card-avatar,
.specialist-card-avatar {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0;
}

.examiner-card-header > .examiner-card-avatar > img,
.professional-card-header > .professional-card-avatar > img,
.teacher-card-header > .teacher-card-avatar img,
.specialist-card-header > .specialist-card-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 4rem;
}

.examiner-content-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.examiner-card-header-info,
.professional-card-header-info,
.teacher-card-header-info,
.specialist-card-header-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  justify-items: center;
}

.examiner-card-title,
.professional-card-title,
.teacher-card-title,
.specialist-card-title {
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 600;
  text-align: center;
}

.examiner-card-location,
.professional-card-location,
.teacher-card-location,
.specialist-card-location {
  font-size: 0.875rem;
  color: #667085;
  text-align: center;
}

.examiner-chair-card-label {
  /* white-space: nowrap; */
  width: fit-content;
  /* max-width: 100%; */
  margin: 0.5rem auto 0 auto;
  background-color: rgba(207, 138, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.professional-card-badge-text,
.teacher-card-badge-text,
.specialist-card-badge-text {
  font-size: 0.875rem;
}

.professional-card-badge,
.teacher-card-badge,
.specialist-card-badge {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
  justify-items: center;
}

.examiner-card-tabs,
.professional-card-tabs,
.teacher-card-tabs,
.specialist-card-tabs {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 1rem;
  border-bottom: 0.5px solid #d0d5dd;
}

.examiner-card-tabs.committee {
  border-bottom: 0.5px solid #cf8a00 !important;
}

.examiner-card-tabs .examiner-tab,
.professional-card-tabs .professional-tab,
.teacher-card-tabs .teacher-tab,
.specialist-card-tabs .specialist-tab {
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  padding: 1rem 0;
  border: 0;
  outline: 0;
  color: #667085;
}

.examiner-card-tabs .examiner-tab.active,
.professional-card-tabs .professional-tab.active,
.teacher-card-tabs .teacher-tab.active,
.specialist-card-tabs .specialist-tab.active {
  font-weight: 600;
  border-bottom: 2px solid black;
  color: black;
}

.examiner-card-tabs .examiner-tab.active.committee {
  border-bottom: 2px solid #cf8a00 !important;
}

.examiner-card-tab,
/* .professional-card-tab, */
.teacher-card-tab,
.specialist-card-tab {
  overflow-y: auto;
  max-height: 200px;
  border-radius: 0;
}

.professional-card-tab {
  /* min-height: 30px; */
  max-height: 200px;
  overflow-y: auto;
}

.examiner-tab-content,
.professional-tab-content,
.teacher-tab-content,
.specialist-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.examiner-tab-content.active,
.professional-tab-content.active,
.teacher-tab-content.active,
.specialist-tab-content.active {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.examiner-card-body,
.professional-card-body,
.teacher-card-body,
.specialist-card-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.examiner-card-body-title {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
}

.examiner-card-body-title-text {
  color: #000000;
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5rem;
}

.examiner-card-body p {
  margin-top: 0.5rem;
}

.examiner-card-body-level {
  font-size: 0.875rem;
  color: #667085;
}

.examiner-card-actions,
.professional-card-actions,
.teacher-card-actions,
.specialist-card-actions {
  padding: 1.5rem;
  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 48px;
}



/* professional card styles */
.professional-card > .bg-white.border-radius-2,
.teacher-card > .bg-white.border-radius-2,
.specialist-card > .bg-white.border-radius-2{
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .directory-tabs {
    flex-direction: column;
    border-radius: 12px;
  }

  .directory-tab {
    padding: 0.75rem;
    border-radius: 100px;
    font-size: 1rem;
    border-bottom: 1px solid #ddd;
  }

  .directory-tab:last-child {
    border-bottom: none;
  }

  .directory-tabs::before {
    display: none; /* Disable slider effect on small screens */
  }

  .active-tab {
    margin-inline: 1rem;
    margin-block: .5rem;
    background-color: #fff;
    font-weight: bold;
  }
}

@media screen and (min-width: 390px) {
  .form-groups {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 768px) {
  /* form layout */
  .form-groups {
    grid-template-columns: repeat(4, 1fr);
  }

  /* card layouts */
  .examiner-cards,
  .professional-cards,
  .teacher-cards,
  .specialist-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 992px) {
  .examiner-card-header > .examiner-card-avatar > img,
  .professional-card-header > .professional-card-avatar > img,
  .teacher-card-header > .teacher-card-avatar > img,
  .specialist-card-header > .specialist-card-avatar > img{
    width: 60px;
    height: 60px;
  }
}

@media screen and (min-width: 1024px) {
  .examiner-card-header,
  .professional-card-header,
  .teacher-card-header,
  .specialist-card-header {
    flex-direction: row;
    justify-content: start;
    justify-items: start;
  }

  .examiner-card-header-info,
  .professional-card-header-info,
  .teacher-card-header-info,
  .specialist-card-header-info {
    justify-content: start;
    justify-items: start;
  }

  .examiner-card-title,
  .professional-card-title,
  .teacher-card-title,
  .specialist-card-title {
    text-align: start;
  }

  .examiner-card-location,
  .professional-card-location,
  .teacher-card-location,
  .specialist-card-location {
    text-align: start;
  }

  .examiner-card-avatar,
  .professional-card-avatar,
  .teacher-card-avatar,
  .specialist-card-avatar {
    justify-content: start;
  }

  .examiner-chair-card-label {
    margin: 0.5rem 0 0 0;
  }

  .professional-card-badge,
  .teacher-card-badge,
  .specialist-card-badge {
    justify-content: start;
  }
}

@media screen and (min-width: 1366px) {
  .section-directory {
    max-width: 1280px;
    padding-bottom: 128px;
  }

  .directory-tab {
    font-size: 1.5rem;
  }

  /* Card layouts */
  .examiner-cards,
  .professional-cards,
  .teacher-cards,
  .specialist-cards {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin: 0 auto;
  }
}
