/* ==============================
GPA Calculator VIT Start
================================= */
:root {
  --vit-calc-accent: #4361ee;
  --vit-calc-accent-deep: #3a56d4;
  --vit-calc-accent-light: #e6f0ff;
  --vit-calc-text: #2b2d42;
  --vit-calc-bg: #f8f9fa;
  --vit-calc-white: #ffffff;
  --vit-calc-border: #e0e3e7;
  --vit-calc-danger: #e74c3c;
  --vit-calc-danger-deep: #bd3324;
  --vit-calc-success: #2ecc71;
  --vit-calc-success-deep: #27ae60;
  --vit-calc-radius: 3px;
  --vit-calc-spacing: 1.5rem;
  --vit-calc-gap: 0.65rem;
}
*{
  box-sizing: border-box;
}

/* ===== Individual course row ===== */
.vit-calc-course-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: var(--vit-calc-gap);
  align-items: center;
  margin-bottom: var(--vit-calc-gap);
}

/* ===== Labels for accessibility ===== */
.vit-calc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Remove button in each row ===== */
.vit-calc-remove {
  background-color: var(--vit-calc-danger) !important;
  border: none;
  cursor: pointer;
  color: var(--vit-calc-white) !important;
  font-size: 1.25rem;
  padding: 0.25rem 1rem;
  height: 45px !important;
  border-radius: var(--vit-calc-radius);
  transition: color 0.2s ease-in-out;
}

.vit-calc-remove:hover {
  color: var(--vit-calc-danger-deep);
}

/* ===== Action row for Add/Calculate buttons ===== */
.vit-calc-action-row {
  display: flex;
  justify-content: flex-start;
  gap: var(--vit-calc-gap);
  margin-top: var(--vit-calc-spacing);
}

/* ===== Result section ===== */
.vit-calc-result {
  margin-top: var(--vit-calc-spacing);
  border-top: 1px solid var(--vit-calc-border);
}

/* ===== Hide element utility ===== */
.hidden {
  display: none;
}

/* ===== Result table ===== */
.vit-calc-result-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--vit-calc-spacing);
}

.vit-calc-result-table th,
.vit-calc-result-table td {
  padding: 0.5rem;
  border: 1px solid var(--vit-calc-border);
  text-align: left;
  font-size: 0.95rem;
}

.vit-calc-result-table th {
  background-color: var(--vit-calc-accent-light);
  color: var(--vit-calc-accent);
  font-weight: 600;
}

.vit-calc-result-summary {
  font-weight: 600;
  margin-top: var(--vit-calc-gap);
}

/* ===== Message for copy success/failure ===== */
.vit-calc-toast {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--vit-calc-success-deep);
}

.vit-calc-toast.error {
  color: var(--vit-calc-danger-deep);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 550px) {
  .vit-calc-course-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .vit-calc-course-row > .vit-calc-remove {
    grid-row: span 2;
    align-self: center;
  }
}
@media (max-width: 450px) {
  .vit-calc-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .vit-calc-reset-btn,
  .vit-calc-copy-btn,
  .vit-calc-pdf-btn,
  .vit-calc-add-course-btn,
  .vit-calc-calculate-btn {
    width: 100% !important;
  }
  .vit-calc-result-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
@media (max-width: 400px) {
  .vit-calc-course-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .vit-calc-course-row > .vit-calc-remove {
    grid-row: auto;
    justify-self: end;
  }
}
/* ==============================
GPA Calculator VIT End
================================= */
