/* ===========================
   CGPA CALCULATOR — WP CODER
   Paste into CSS tab
=========================== */

.cgpa-section {
  border: 2px solid #dce6ff;
  border-radius: 24px;
  padding: 50px 40px;
  background: #ffffff;
  margin: 40px 0;
}

.cgpa-wrap {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* LEFT SECTION */
.cgpa-left {
  flex: 1.1;
  padding-right: 20px;
  padding-top: 30px;
}

.cgpa-title {
  font-size: 62px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  color: #1a3fbf !important;
  letter-spacing: -1px;
  margin: 0 0 24px 0 !important;
}

.cgpa-line {
  width: 60px;
  height: 5px;
  background: #1a3fbf;
  border-radius: 10px;
  margin-bottom: 24px;
}

.cgpa-subtitle {
  font-size: 19px !important;
  color: #444 !important;
  line-height: 1.7 !important;
  max-width: 480px;
  margin: 0 0 30px 0 !important;
}

.cgpa-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cgpa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1a3fbf;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid #c7d2fe;
}

/* RIGHT SECTION */
.cgpa-right {
  flex: 1;
  min-width: 340px;
}

.cgpa-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 4px 30px rgba(26, 63, 191, 0.10);
  border: 1px solid #e8edff;
}

/* CARD HEADER */
.cgpa-card-header {
  margin-bottom: 28px;
}

.cgpa-chip {
  display: inline-block;
  background: #eef2ff;
  color: #1a3fbf;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* TABS */
.cgpa-tabs {
  display: flex;
  background: #f1f5ff;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.cgpa-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: all 0.2s;
}

.cgpa-tab.active {
  background: #1a3fbf;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(26, 63, 191, 0.25);
}

.cgpa-tab:hover:not(.active) {
  background: #e0e7ff;
  color: #1a3fbf;
}

/* FORM FIELDS */
.cgpa-field {
  margin-bottom: 20px;
}

.cgpa-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.cgpa-field input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #dce6ff;
  border-radius: 10px;
  font-size: 18px;
  color: #0f1a3c;
  background: #f8faff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cgpa-field input[type="number"]:focus {
  border-color: #1a3fbf;
  background: #fff;
}

.cgpa-field input[type="number"]::-webkit-inner-spin-button,
.cgpa-field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.cgpa-select-wrap {
  position: relative;
}

.cgpa-select-wrap select {
  width: 100%;
  padding: 14px 42px 14px 16px;
  border: 2px solid #dce6ff;
  border-radius: 10px;
  font-size: 15px;
  color: #0f1a3c;
  background: #f8faff;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.cgpa-select-wrap select:focus {
  border-color: #1a3fbf;
  background: #fff;
}

.cgpa-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #1a3fbf;
  font-size: 12px;
  pointer-events: none;
}

/* ERROR */
.cgpa-error {
  color: #c0392b;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 10px;
  font-weight: 500;
}

/* RESULT BOX */
.cgpa-hidden {
  display: none !important;
}

.cgpa-result-box {
  margin-top: 20px;
  background: linear-gradient(135deg, #1a3fbf 0%, #3a5ce8 100%);
  border-radius: 14px;
  padding: 28px 24px 20px;
  animation: cgpaFadeIn 0.4s ease;
}

@keyframes cgpaFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cgpa-result-inner {
  text-align: center;
  margin-bottom: 20px;
}

.cgpa-result-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.cgpa-result-value {
  font-size: 64px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.cgpa-formula-text {
  font-size: 14px;
  color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.10);
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
}

/* ACTION BUTTONS */
.cgpa-actions {
  display: flex;
  gap: 10px;
}

.cgpa-btn-copy,
.cgpa-btn-reset {
  flex: 1;
  padding: 11px 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.cgpa-btn-copy {
  background: #ffffff;
  color: #1a3fbf;
}

.cgpa-btn-reset {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.3);
}

.cgpa-btn-copy:hover,
.cgpa-btn-reset:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .cgpa-section {
    padding: 30px 20px;
    border-radius: 16px;
  }

  .cgpa-wrap {
    flex-direction: column;
    gap: 36px;
  }

  .cgpa-left {
    padding-right: 0;
  }

  .cgpa-title {
    font-size: 42px !important;
  }

  .cgpa-subtitle {
    font-size: 16px !important;
  }

  .cgpa-right {
    min-width: unset;
    width: 100%;
  }

  .cgpa-card {
    padding: 24px 20px;
  }

  .cgpa-result-value {
    font-size: 52px;
  }
}

@media (max-width: 480px) {
  .cgpa-title {
    font-size: 34px !important;
  }
}