/* Program comparison styles */
.program-comparison-wrapper {
  display: inline-flex;
  align-items: center;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 9;
  gap: 4;
}

.program-comparison-checkbox {
  font-size: inherit;
  height: 2em;
  width: 2em;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 1;
}

.program-comparison-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 5px;
  margin-left: 23px;
  position: relative;
  white-space: nowrap;
  font-weight: 600 !important;
}

.program-comparison-label::before {
  display: block;
  font-family: 'Font Awesome 6 Pro';
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  position: absolute;
  left: -0.85em;
  top: 47%;
  transform: translateY(-50%);
  content: '\f0c8';
}

@media print, screen and (min-width: 48.0625em) {
  .program-comparison-label {
    margin-left: 33px;
  }
  .program-comparison-label::before {
    font-size: 1.25rem;
  }
}

.program-comparison-checkbox:checked ~ .program-comparison-label::before {
  content: '\f14a';
  font-weight: 900;
  color: #a51c30;
}

.program-comparison-checkbox:focus-visible ~ .program-comparison-label::before {
  outline: 2px solid #a51c30;
  outline-offset: 2px;
}

.program-comparison-button {
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.program-comparison-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.program-comparison-buttons {
  align-items: flex-end;
}

.program-comparison-clear:hover {
  background: #5a6268 !important;
  transform: translateY(-1px);
}

.program-comparison-clear-icon {
  font-size: 0.75em;
  opacity: 0.7;
  cursor: pointer;
  margin-left: 11px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.program-comparison-clear-icon:hover {
  opacity: 1;
}

.program-comparison-toast {
  animation: slideInRight 0.3s ease-out;
}

.program-comparison-checkbox-toast {
  animation: checkboxToastSlide 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes checkboxToastSlide {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Modal open/close transitions */
.program-comparison-modal-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.program-comparison-modal-overlay.is-open {
  opacity: 1;
}

.program-comparison-modal-overlay .modal-content {
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.program-comparison-modal-overlay.is-open .modal-content {
  transform: scale(1) translateY(0);
}

.program-comparison-modal-overlay .modal-content .program-comparison-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  border-bottom: 1px solid #dddddd79;
  border-left: 0px solid #dddddd4a;
  border-top: 0px !important;
  vertical-align: top;
  font-size: 0.95em;
  min-width: 180px;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  min-width: 115px;
  position: sticky;
  left: 0;
  z-index: 2;
}

.comparison-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.comparison-table thead th:first-child {
  z-index: 3;
  left: 0;
}

.comparison-table thead {
  transition: box-shadow 0.3s ease;
}

.comparison-table thead.is-scrolled th {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  clip-path: inset(0 0 -12px 0);
}

.comparison-table.is-scrolled-x th:first-child,
.comparison-table.is-scrolled-x td:first-child {
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.15);
  clip-path: inset(0 -12px 0 0);
}

.comparison-table thead:first-child tr:first-child th:first-child,
.comparison-table tbody:first-child tr:first-child td:first-child,
.comparison-table tbody:first-child tr:first-child th:first-child,
.comparison-table thead:first-child tr:first-child th:last-child,
.comparison-table tbody:first-child tr:first-child td:last-child,
.comparison-table tbody:first-child tr:first-child th:last-child {
  border-radius: 0;
}

.comparison-table th {
  background-color: #dcf5f6;
  color: white;
  font-weight: bold;
}

.field-header {
  width: 200px;
  background-color: #dcf5f6 !important;
}

.program-header a {
  font-size: 0.975rem;
  line-height: 1;
  color: #121212;
  text-decoration: none;
}

.program-header a:hover {
  text-decoration: underline;
  color: rgba(26, 26, 26, 0.95);
}

.field-label {
  font-weight: bold;
}

.comparison-tuition {
  color: #121212;
  font-weight: bold;
  font-size: 0.95em !important;
}

.comparison-duration {
  color: #121212;
  font-weight: 500;
  font-size: 0.95em !important;
}

.comparison-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background-color: #dcf5f6;
  color: #114f5a;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 2px 4px 2px 0;
}

.field-value {
  max-width: 200px;
  word-wrap: break-word;
}

.field-value ul,
.field-value ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.field-value li {
  margin-top: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1;
}

.field-value li::before {
  position: absolute;
  top: 0;
  left: 0;
}

.field-value ul > li::before {
  background-color: #a51c30;
  border-radius: 50%;
  color: #a51c30;
  content: '';
  height: 4px;
  width: 4px;
  top: 0.375rem;
}

.field-value ol {
  counter-reset: li;
}

.field-value ol > li {
  counter-increment: li;
}

.field-value ol > li::before {
  color: #a51c30;
  content: counter(li) '.';
}

.comparison-dates {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comparison-date-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em !important;
  color: #121212;
}

.comparison-date-item i {
  font-size: 0.85rem;
}

.modal-header {
  padding: 80px 40px 25px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #114f5a;
  border-radius: 0;
  flex-shrink: 0;
}

.modal-header .modal-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.modal-header h2 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 3.75rem;
  line-height: 1;
}

.modal-header p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
}

.modal-close {
  position: absolute;
  top: 5%;
  right: 1%;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.modal-close:hover {
  opacity: 0.7;
}

.modal-body {
  padding: 0px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.modal-body tr:nth-child(even) {
  background-color: #f5f0f0;
}

.comparison-table-wrapper {
  overflow: auto;
  flex: 1;
}

/* Make program listing items relative for checkbox positioning */
.program-listing-item {
  position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .program-header a {
    font-size: 0.9rem;
  }

  .program-comparison-buttons {
    bottom: 10px;
    right: 10px;
  }

  .program-comparison-button {
    font-size: 14px;
    padding: 8px 12px;
  }

  .program-comparison-clear {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  .comparison-table {
    font-size: 12px;
    width: auto;
    min-width: 100%;
  }

  .comparison-badge {
    font-size: 12px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child {
    background-color: #a51c30;
  }

  .comparison-table tbody td:first-child {
    background-color: #fff;
  }

  .modal-body tr:nth-child(even) td:first-child {
    background-color: #f5f0f0;
  }
  .program-comparison-wrapper {
    top: 5px;
    right: 5px;
  }

  .modal-header h2 {
    font-size: 2rem;
  }

  .modal-header p {
    font-size: 12px;
    display: none;
  }

  .modal-header {
    padding: 30px 20px 15px;
  }
}
