/* ==========================================================================
   GPA CALCULATOR - STYLES
   Exact replica of reference image & Calculator Archive design system
   ========================================================================== */

.gpa-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 18px 40px;
  font-family: Arial, Helvetica, sans-serif;
  color: #333333;
}

/* Top Bar & Breadcrumbs */
.gpa-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.gpa-breadcrumbs {
  font-size: 13px;
  color: #555555;
  margin-bottom: 0;
}

.gpa-breadcrumbs a {
  color: #0844a4;
  text-decoration: none;
}

.gpa-breadcrumbs a:hover {
  text-decoration: underline;
}

.gpa-breadcrumbs .sep {
  margin: 0 4px;
  color: #666666;
}

.gpa-breadcrumbs .current {
  color: #0844a4;
  font-weight: normal;
}

.gpa-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gpa-top-btn {
  background: #ffffff;
  border: 1px solid #7f9db9;
  color: #0844a4;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 9px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gpa-top-btn:hover {
  background: #f0f4f8;
  border-color: #0b386b;
  color: #0b386b;
}

.gpa-top-btn svg {
  width: 13px;
  height: 13px;
}

/* Page Title & Header */
.gpa-title {
  font-size: 24px;
  font-weight: bold;
  color: #0844a4;
  margin: 4px 0 6px 0;
  line-height: 1.2;
}

.gpa-intro-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #222222;
  margin: 0 0 16px 0;
  max-width: 820px;
}

.gpa-intro-desc a {
  color: #0844a4;
  text-decoration: underline;
}

/* Main Layout: 2 Columns */
.gpa-main-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.gpa-calc-col {
  flex: 1;
  min-width: 0;
}

.gpa-sidebar-col {
  width: 250px;
  flex-shrink: 0;
}

/* Calculator Section Boxes */
.gpa-card-box {
  background: #f2f4f8;
  border: 1px solid #c8d5e5;
  padding: 12px 14px;
  max-width: 340px;
  box-sizing: border-box;
  margin-bottom: 20px;
}

/* Table Style for GPA Courses */
.gpa-courses-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #b8c9dd;
}

.gpa-courses-table th {
  background: #e8eef5;
  border: 1px solid #b8c9dd;
  padding: 5px 6px;
  font-size: 12.5px;
  font-weight: bold;
  color: #111111;
  text-align: left;
}

.gpa-courses-table td {
  border: 1px solid #cdd8e6;
  padding: 4px 4px;
  vertical-align: middle;
}

.gpa-courses-table .th-course {
  width: 50%;
}

.gpa-courses-table .th-credits {
  width: 25%;
}

.gpa-courses-table .th-grade {
  width: 25%;
}

.gpa-input-text {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #7f9db9;
  padding: 3px 5px;
  font-size: 12.5px;
  font-family: inherit;
  background: #ffffff;
  color: #111111;
  border-radius: 0;
}

.gpa-input-text:focus {
  outline: 1px solid #0844a4;
  border-color: #0844a4;
}

.gpa-select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #7f9db9;
  padding: 2px 2px;
  font-size: 12.5px;
  font-family: inherit;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  border-radius: 0;
}

.gpa-select:focus {
  outline: 1px solid #0844a4;
  border-color: #0844a4;
}

.gpa-add-course-row {
  margin-top: 6px;
  text-align: center;
}

.gpa-add-link {
  color: #0844a4;
  text-decoration: underline;
  font-size: 12.5px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  font-weight: normal;
}

.gpa-add-link:hover {
  color: #063175;
}

.gpa-remove-row-btn {
  background: none;
  border: none;
  color: #991b1b;
  font-size: 15px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.gpa-remove-row-btn:hover {
  color: #dc2626;
  font-weight: bold;
}

/* Button Row */
.gpa-btn-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gpa-calc-btn {
  background: #447d28;
  border: 1px solid #33611e;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.gpa-calc-btn:hover {
  background: #3a6b22;
}

.gpa-calc-btn .play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-size: 8px;
  line-height: 1;
}

.gpa-clear-btn {
  background: #8e98a3;
  border: 1px solid #79828c;
  color: #ffffff;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.gpa-clear-btn:hover {
  background: #7a848f;
}

.gpa-settings-link {
  color: #0844a4;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  font-weight: normal;
  margin-left: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.gpa-settings-link:hover {
  color: #063175;
}

/* GPA Planning Calculator Section */
.gpa-section-heading {
  font-size: 18px;
  font-weight: bold;
  color: #0844a4;
  margin: 28px 0 6px 0;
}

.gpa-plan-table {
  width: 100%;
  border-collapse: collapse;
}

.gpa-plan-table td {
  padding: 5px 3px;
  font-size: 13px;
  vertical-align: middle;
}

.gpa-plan-label-cell {
  width: 48%;
  color: #222222;
}

.gpa-plan-input-cell {
  width: 52%;
}

.gpa-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #334155;
  font-size: 10px;
  font-weight: bold;
  cursor: help;
  margin-left: 2px;
  vertical-align: middle;
  text-decoration: none;
}

.gpa-tooltip-icon:hover {
  background: #94a3b8;
  color: #0f172a;
}

/* Result Display Cards */
.gpa-result-card {
  background: #ffffff;
  border: 1px solid #b8d0e8;
  border-radius: 3px;
  padding: 14px 16px;
  margin-top: 14px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gpa-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d4e2f2;
  padding-bottom: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: bold;
  color: #003366;
}

.gpa-result-highlight {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.gpa-score-large {
  font-size: 32px;
  font-weight: bold;
  color: #2e7d32;
  line-height: 1;
}

.gpa-letter-badge {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
}

.gpa-honors-badge {
  background: #eef4fc;
  color: #0844a4;
  border: 1px solid #c8d8ec;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 3px;
}

.gpa-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
}

.gpa-metric-item {
  display: flex;
  flex-direction: column;
}

.gpa-metric-label {
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 2px;
}

.gpa-metric-val {
  font-size: 15px;
  font-weight: bold;
  color: #003366;
}

/* GPA Meter / Gauge */
.gpa-gauge-wrapper {
  margin: 14px 0 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  border-radius: 3px;
}

.gpa-gauge-title {
  font-size: 12px;
  font-weight: bold;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.gpa-scale-bar {
  position: relative;
  height: 16px;
  background: linear-gradient(to right, #ef4444 0%, #ef4444 50%, #f59e0b 50%, #f59e0b 72.5%, #3b82f6 72.5%, #3b82f6 87.5%, #10b981 87.5%, #10b981 100%);
  border-radius: 8px;
  margin: 10px 0 24px;
}

.gpa-scale-pointer {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.3s ease;
}

.gpa-pointer-pin {
  width: 4px;
  height: 28px;
  background: #0f172a;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0,0,0,0.4);
}

.gpa-pointer-bubble {
  margin-top: 3px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.gpa-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #64748b;
  margin-top: 4px;
}

/* Visualization Row (Donut & Course Points) */
.gpa-visual-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .gpa-visual-row {
    grid-template-columns: 1fr;
  }
}

.gpa-chart-box {
  text-align: center;
  background: #ffffff;
  padding: 8px;
}

.gpa-table-summary {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.gpa-table-summary th {
  background: #f1f5f9;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  text-align: left;
  color: #475569;
}

.gpa-table-summary td {
  padding: 4px 6px;
  border: 1px solid #e2e8f0;
}

/* Right Sidebar Elements */
.gpa-search-form {
  display: flex;
  margin-bottom: 14px;
  position: relative;
}

.gpa-search-input {
  flex: 1;
  border: 1px solid #7f9db9;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  border-right: none;
  box-sizing: border-box;
}

.gpa-search-input:focus {
  outline: none;
  border-color: #0b386b;
}

.gpa-search-btn {
  background: #295f8f;
  border: 1px solid #1c4263;
  color: #ffffff;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.gpa-search-btn:hover {
  background: #1c4263;
}

.gpa-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-top: none;
  z-index: 1000;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gpa-search-dropdown.active {
  display: block;
}

.gpa-search-item {
  padding: 7px 10px;
  font-size: 12.5px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gpa-search-item:hover,
.gpa-search-item.highlighted {
  background-color: #eaf2fb;
  color: #0b386b;
}

.gpa-search-item-cat {
  font-size: 11px;
  color: #888888;
}

/* Side Card */
.gpa-side-card {
  border: 1px solid #c8d5e5;
  background: #ffffff;
  margin-bottom: 16px;
}

.gpa-side-card-header {
  background: #295f8f;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 10px;
}

.gpa-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px 10px;
  gap: 3px 10px;
  font-size: 12.5px;
}

.gpa-side-card-grid a {
  color: #0844a4;
  text-decoration: underline;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gpa-side-card-grid a:hover {
  color: #05265e;
}

.gpa-side-card-grid a.active {
  font-weight: bold;
  color: #000000;
  text-decoration: none;
}

.gpa-side-card-footer {
  border-top: 1px solid #e0e8f0;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #666666;
  text-align: center;
  background: #f7f9fc;
}

.gpa-side-card-footer a {
  color: #0844a4;
  text-decoration: underline;
}

/* Modals */
.gpa-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.gpa-modal-overlay.active {
  display: flex;
}

.gpa-modal-dialog {
  background: #ffffff;
  border: 1px solid #003366;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gpa-modal-header {
  background: #003366;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gpa-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: bold;
}

.gpa-modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpa-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.gpa-modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
}

.gpa-modal-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast */
.gpa-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #003366;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 3px;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.gpa-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Authoritative Educational SEO Section */
.gpa-content-section {
  margin-top: 40px;
  border-top: 1px solid #d0dbe8;
  padding-top: 24px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #222222;
}

.gpa-content-section h2 {
  font-size: 17px;
  color: #0844a4;
  margin: 20px 0 8px 0;
  font-weight: bold;
}

.gpa-content-section h3 {
  font-size: 14.5px;
  color: #003366;
  margin: 16px 0 6px 0;
  font-weight: bold;
}

.gpa-content-section p {
  margin: 0 0 12px 0;
}

.gpa-content-section ul,
.gpa-content-section ol {
  margin: 0 0 14px 0;
  padding-left: 24px;
}

.gpa-content-section li {
  margin-bottom: 6px;
}

.gpa-content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 12.5px;
}

.gpa-content-section th {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  text-align: left;
  color: #1e293b;
}

.gpa-content-section td {
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
}

.gpa-formula-box {
  background: #eef4fc;
  border: 1px solid #b8cde8;
  border-radius: 3px;
  padding: 12px 16px;
  margin: 14px 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 13.5px;
  color: #003366;
}

/* FAQ Accordion Section */
.gpa-faq-section {
  margin-top: 24px;
  border-top: 1px solid #d0dbe8;
  padding-top: 20px;
}

.gpa-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  margin-bottom: 8px;
  background: #ffffff;
}

.gpa-faq-question {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: none;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: bold;
  color: #003366;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.gpa-faq-question:hover {
  background: #f1f5f9;
}

.gpa-faq-answer {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
  border-top: 1px solid #e2e8f0;
  display: none;
}

.gpa-faq-item.open .gpa-faq-answer {
  display: block;
}

.gpa-faq-item.open .gpa-faq-icon {
  transform: rotate(180deg);
}

.gpa-faq-icon {
  transition: transform 0.2s ease;
  font-size: 11px;
}

/* Print Specific Media Rules */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .site-header,
  .site-footer,
  .gpa-top-actions,
  .gpa-sidebar-col,
  .gpa-search-form,
  .gpa-add-link,
  .gpa-btn-row,
  .gpa-settings-link,
  .gpa-remove-row-btn,
  .gpa-toast,
  .gpa-faq-section,
  .gpa-content-section,
  .no-print {
    display: none !important;
  }

  .gpa-page-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .gpa-main-layout {
    display: block !important;
  }

  .gpa-calc-col {
    width: 100% !important;
  }

  .gpa-card-box {
    background: #ffffff !important;
    border: 1px solid #999999 !important;
    max-width: 100% !important;
  }

  .gpa-result-card {
    box-shadow: none !important;
    border: 1px solid #666666 !important;
  }

  body.gpa-printing-modal * {
    visibility: hidden;
  }

  body.gpa-printing-modal #gpa-print-modal,
  body.gpa-printing-modal #gpa-print-modal * {
    visibility: visible;
  }

  body.gpa-printing-modal #gpa-print-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff;
    display: block !important;
  }

  body.gpa-printing-modal .gpa-modal-dialog {
    border: none;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
  }

  body.gpa-printing-modal .gpa-modal-header,
  body.gpa-printing-modal .gpa-modal-footer,
  body.gpa-printing-modal .gpa-modal-close {
    display: none !important;
  }

  body.gpa-printing-modal .gpa-modal-body {
    padding: 0 !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gpa-main-layout {
    flex-direction: column;
  }

  .gpa-sidebar-col {
    width: 100%;
    margin-top: 24px;
  }

  .gpa-card-box {
    max-width: 100%;
  }
}
