/* ==========================================================================
   Scoped Stylesheet for Learning Center Resource Pages (Legacy Look)
   ========================================================================== */

.lc-legacy-container {
  background-color: #f9fafb;
  padding-top: 200px; /* Offset for marquee announcement banner + fixed header navbar */
  padding-bottom: 80px;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  color: #334155;
  min-height: calc(100vh - 164px);
  width: 100%;
  box-sizing: border-box;
}

/* Scoped Container & Grid System */
.lc-legacy-container .container {
  width: 100%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
  box-sizing: border-box;
}

.lc-legacy-container .row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.lc-legacy-container [class*="col-"] {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
  box-sizing: border-box;
  width: 100%;
}

/* Default grid columns display block / float left for compatibility */
.lc-legacy-container .row > [class*="col-"] {
  float: left;
}

.lc-legacy-container .col-xs-12 { width: 100%; }
.lc-legacy-container .col-xs-4 { width: 33.333333%; }

@media (min-width: 768px) {
  .lc-legacy-container .col-sm-4 { width: 33.333333%; }
  .lc-legacy-container .col-sm-12 { width: 100%; }
}

@media (min-width: 992px) {
  .lc-legacy-container .col-md-4 { width: 33.333333%; }
  .lc-legacy-container .col-md-11 { width: 91.666667%; }
  .lc-legacy-container .col-md-1 { width: 8.333333%; }
  .lc-legacy-container .col-md-12 { width: 100%; }
}

@media (min-width: 1200px) {
  .lc-legacy-container .col-lg-4 { width: 33.333333%; }
  .lc-legacy-container .col-lg-11 { width: 91.666667%; }
  .lc-legacy-container .col-lg-1 { width: 8.333333%; }
  .lc-legacy-container .col-lg-12 { width: 100%; }
}

/* Panel Structure */
.lc-legacy-container .panel {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  margin-bottom: 24px;
  overflow: hidden;
  width: 100%;
}

.lc-legacy-container .panel-body {
  padding: 32px;
  box-sizing: border-box;
}

.lc-legacy-container .border-btm {
  border-bottom: 1px solid #edf2f7;
}

/* Title and Back link alignment styling */
.lc-legacy-container .lc-text.margintop10px {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  float: none !important;
}

.lc-legacy-container .lc-text.margintop10px > .col-lg-11 {
  width: auto !important;
  float: none !important;
  flex: 1 !important;
  text-align: left !important;
  padding: 0 !important;
}

.lc-legacy-container .lc-text.margintop10px .col-lg-4 {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.lc-legacy-container .lc-text.margintop10px > .col-lg-1 {
  width: auto !important;
  float: none !important;
  flex: 0 0 auto !important;
  text-align: right !important;
  padding: 0 !important;
}

/* Resource Card Grid Flex Container (Resolves height mismatch float wrap bug) */
.lc-legacy-container .nmbr-statistic-area {
  display: flex !important;
  flex-wrap: wrap !important;
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
}

.lc-legacy-container .nmbr-statistic-area > [class*="col-"] {
  float: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.lc-legacy-container .nmbr-statistic-area > [class*="col-"] > a.fetch {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  text-decoration: none !important;
}

/* Card Widget Styles */
.lc-legacy-container .box-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  flex: 1 !important; /* Stretch widget to fill the anchor wrapper height */
  height: auto !important;
}

.lc-legacy-container .box-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.lc-legacy-container .box-widget.border-one:hover {
  border-color: #dc6900 !important;
}

.lc-legacy-container .box-widget.border-two:hover {
  border-color: #f3575b !important;
}

.lc-legacy-container .border-one {
  border: 2px solid #dc6900 !important;
}

.lc-legacy-container .border-two {
  border: 2px solid #f3575b !important;
}

.lc-legacy-container .font-one {
  color: #0f172a !important;
}

.lc-legacy-container .nmbr-statistic-block {
  padding: 24px 16px;
  min-height: 140px;
  box-sizing: border-box;
  text-align: center;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  flex: 1 !important;
}

.lc-legacy-container .nmbr-statistic-info {
  width: 100%;
  margin-bottom: 10px;
}

.lc-legacy-container .box-widget img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  display: inline-block;
}

/* Typography & Helpers */
.lc-legacy-container .lc-text {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  line-height: 1.5;
}

.lc-legacy-container a.lc-text {
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 700;
  transition: color 0.15s ease;
}

.lc-legacy-container a.lc-text:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

.lc-legacy-container .opensanssemibold {
  font-weight: 600 !important;
}

.lc-legacy-container .textc {
  color: #1e293b !important;
  text-align: center;
}

.lc-legacy-container .padding0 { padding: 0 !important; }
.lc-legacy-container .paddingleft0 { padding-left: 0 !important; }
.lc-legacy-container .margintop5px { margin-top: 5px !important; }
.lc-legacy-container .margintop10px { margin-top: 10px !important; }
.lc-legacy-container .margintop15px { margin-top: 15px !important; }
.lc-legacy-container .margintop20px { margin-top: 20px !important; }
.lc-legacy-container .marginbottom15px { margin-bottom: 15px !important; }
.lc-legacy-container .marginright10px { margin-right: 10px !important; }
.lc-legacy-container .text-right { text-align: right !important; }
.lc-legacy-container .text-center { text-align: center !important; }

/* Video Grid and Embed Styling */
.lc-legacy-container .video {
  height: 0;
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.lc-legacy-container .video iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lc-legacy-container .robotomedium {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-top: 10px;
  text-align: left;
}

/* ==========================================================================
   Popup Bootbox Dialog Styles & Centering Overrides
   ========================================================================== */

.bootbox.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1050 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(15, 23, 42, 0.4) !important;
  box-sizing: border-box;
}

.bootbox.modal.in {
  display: flex !important;
}

.modal-backdrop {
  display: none !important;
}

.bootbox .modal-dialog {
  margin: auto !important;
  max-width: 550px;
  width: 92% !important;
}

.bootbox .modal-content {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  background: #ffffff !important;
  overflow: hidden;
}

.bootbox .modal-header {
  padding: 16px 24px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.bootbox .modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-align: center;
  width: 100%;
}

.bootbox .modal-header .close {
  font-size: 24px;
  font-weight: 300;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.bootbox .modal-body {
  padding: 24px !important;
}

.bootbox .modal-footer {
  padding: 16px 24px !important;
  border-top: 1px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
  display: flex !important;
  justify-content: flex-end !important;
}

.bootbox .modal-footer .btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  color: #ffffff !important;
  border: none !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  padding: 10px 24px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35) !important;
  transition: all 0.2s ease !important;
}

.bootbox .modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
}

/* Scoped centering rules for popup details contents */
.bootbox .dt {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important; /* Centered items horizontally */
  align-items: center !important;
  gap: 24px !important;
  max-height: 400px;
  overflow-y: auto;
  width: 100%;
  padding: 10px 0;
  box-sizing: border-box;
}

/* Ensure the child wrappers generated by JS also flex and center */
.bootbox .dt > div {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  float: none !important;
  width: auto !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bootbox .dt a {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 16px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.bootbox .dt a:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  transform: translateY(-2px);
}

.bootbox .dt img {
  display: block !important;
  max-height: 80px !important;
  width: auto !important;
  object-fit: contain !important;
}
