/* AFB Study Plan – structural styles only (theme controls fonts/sizes). */

.afb-study-plan {
  margin-bottom: 2rem;
  position: relative;
}

/* ---- Header: title centered, PDF on the side ---- */
.afb-plan-header {
  position: relative;
  text-align: center;
  margin-bottom: 1.25rem;
  padding-inline: 7rem;
  min-height: 2.5rem;
}

.afb-plan-title {
  margin: 0;
  text-align: center;
  color: #0d6efd;
}

.afb-plan-major {
  text-align: center;
  color: #6c757d;
  margin: 0.15rem 0 0;
}

.afb-export-pdf {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  white-space: nowrap;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #0d6efd;
  border-radius: 0.375rem;
  background: #fff;
  color: #0d6efd;
  cursor: pointer;
  line-height: 1.2;
  text-decoration: none;
}

.afb-export-pdf:hover {
  background: #0d6efd;
  color: #fff;
}

.afb-export-pdf.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

@media (max-width: 576px) {
  .afb-plan-header {
    padding-inline: 0;
    padding-top: 2.75rem;
  }
  .afb-export-label {
    display: none;
  }
}

/* ---- Accordion ---- */
.afb-study-plan .accordion-item {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.afb-study-plan .accordion-button {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  text-align: inherit;
  padding: 0.85rem 1rem;
  border: 0;
  background: #fff;
  color: inherit;
  cursor: pointer;
  box-shadow: none;
}

.afb-study-plan .accordion-button:not(.collapsed) {
  background-color: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
}

.afb-study-plan .accordion-button::after,
.afb-study-plan .accordion-button::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

.afb-acc-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-width: 0;
}

.afb-acc-chevron {
  margin-inline-start: auto;
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.afb-study-plan .accordion-button:not(.collapsed) .afb-acc-chevron {
  transform: rotate(-135deg);
  opacity: 1;
}

.afb-study-plan .accordion-collapse {
  display: none;
}

.afb-study-plan .accordion-collapse.show {
  display: block;
}

.afb-study-plan .accordion-body {
  padding: 0;
  border-top: 1px solid #dee2e6;
}

/* ---- Table ---- */
.afb-study-plan .table-responsive {
  overflow-x: auto;
}

.afb-study-plan .table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.afb-study-plan .table th,
.afb-study-plan .table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.afb-study-plan .table thead th {
  background: #cfe2ff;
  color: #084298;
  font-weight: 600;
}

.afb-study-plan .table-hover tbody tr:hover {
  background: rgba(13, 110, 253, 0.04);
}

.afb-study-plan .badge {
  display: inline-block;
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  line-height: 1.2;
}

.afb-study-plan .bg-primary {
  background: #0d6efd;
  color: #fff;
}

.afb-study-plan .bg-secondary {
  background: #6c757d;
  color: #fff;
}

.afb-study-plan .text-muted {
  color: #6c757d;
}

.afb-study-plan .text-primary {
  color: #0d6efd;
}

.afb-study-plan .afb-total-hours {
  border: 1px solid #0d6efd;
  border-radius: 0.375rem;
  background: #f8f9fa;
}

.afb-study-plan .afb-total-hours .card-body {
  padding: 0.85rem;
  text-align: center;
}

.afb-sp-alert,
.afb-study-plan .alert {
  padding: 0.85rem 1rem;
  border-radius: 0.375rem;
  margin: 1rem auto;
  max-width: 720px;
}

.afb-study-plan .alert-warning {
  background: #fff3cd;
  border: 1px solid #ffecb5;
  color: #664d03;
}

.afb-study-plan .alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}

.afb-study-plan .alert-secondary {
  background: #e2e3e5;
  border: 1px solid #d3d6d8;
  color: #41464b;
}

/*
 * College shortcode view — stacked full plans (image 2 design).
 * NO outer "majors list" accordion. Each major = independent plan block.
 */
.afb-college-view {
  width: 100%;
}

.afb-college-view .afb-college-major-block {
  margin-bottom: 2.75rem;
}

.afb-college-view .afb-college-major-block:last-child {
  margin-bottom: 0;
}

.afb-college-view .afb-study-plan {
  margin-bottom: 0;
}
