/* -------------------------------------------------------------
 * LeafBrowser - GPA, Final Grade & Weighted Grade Calculators
 * Modern SaaS UI Redesign matching Grade Calculator & Study Timer
 * ------------------------------------------------------------- */

/* ── Tool Action Buttons Row ────────────────────────────────── */
.leaf-tool-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem 0;
}

/* ── Form Inputs & Field Hints ──────────────────────────────── */
.leaf-form-group {
  display: flex;
  flex-direction: column;
}

.leaf-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  display: block;
}

.leaf-input-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 5px;
  line-height: 1.4;
}

/* ── GPA Course Table ───────────────────────────────────────── */
.leaf-gpa-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.leaf-gpa-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leaf-gpa-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.leaf-gpa-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.leaf-gpa-table tr:last-child td {
  border-bottom: none;
}

.leaf-gpa-table tr:hover td {
  background-color: #fafbfc;
}

.leaf-gpa-table input,
.leaf-gpa-table select {
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
}

.leaf-gpa-row-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leaf-gpa-row-del:hover {
  color: #ef4444;
  background-color: #fee2e2;
  transform: scale(1.08);
}

/* ── GPA Luxury Score Cards Grid ────────────────────────────── */
.leaf-gpa-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.leaf-grade-score-card {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 12px 28px -6px rgba(5, 150, 105, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.leaf-grade-score-card.blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 12px 28px -6px rgba(2, 132, 199, 0.35);
}

.leaf-grade-score-card.amber {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 12px 28px -6px rgba(217, 119, 6, 0.35);
}

.leaf-grade-score-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 60%);
  pointer-events: none;
}

.leaf-grade-score-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 700;
}

.leaf-grade-score-val {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.leaf-grade-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 16px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Final Grade Calculator Panel ───────────────────────────── */
.leaf-fg-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.leaf-fg-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaf-fg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Dynamic Outcome Result Box */
.leaf-fg-result-box {
  margin-top: 2rem;
  padding: 2rem 2.25rem;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  display: none;
  position: relative;
  overflow: hidden;
}

.leaf-fg-result-box.visible {
  display: block;
  animation: leafFadeIn 0.35s ease;
}

@keyframes leafFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.leaf-fg-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.leaf-fg-result-headline {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.leaf-fg-result-score {
  font-size: 3.75rem;
  font-weight: 800;
  color: #059669;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0.5rem 0;
}

.leaf-fg-result-note {
  color: #475569;
  font-size: 1.02rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ── Weighted Grade Calculator: Tracker & Table ─────────────── */
.leaf-wg-weight-tracker {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.75rem;
}

.leaf-wg-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

.leaf-wg-weight-info {
  color: #475569;
  font-weight: 600;
}

.leaf-wg-weight-info strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.leaf-wg-tracker-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

.leaf-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.leaf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 9999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.leaf-wg-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.leaf-wg-table {
  width: 100%;
  border-collapse: collapse;
}

.leaf-wg-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.leaf-wg-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.leaf-wg-table tr:last-child td {
  border-bottom: none;
}

.leaf-wg-table tr:hover td {
  background-color: #fafbfc;
}

.leaf-wg-table input {
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
}
