/* GConnect 8th CPC Calculator - v1.5 (reduced white space on mobile + dark cards) */

:root{
  --gc8-accent: #2563eb;         /* calm blue */
  --gc8-accent-soft: #eff6ff;    /* very light blue bg */
  --gc8-border: #e5e7eb;
  --gc8-text: #111827;
  --gc8-muted: #6b7280;
}

/* Container width fix */
.gc8-container{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width: 100%;           /* FULL WIDTH to avoid boxed look */
  margin: 0 auto;
  padding: 8px;              /* smaller default padding */
  color: var(--gc8-text);
}

/* For small phones, tighten the sides even more */
@media (max-width: 480px){
  .gc8-container{
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* Main card */
.gc8-card{
  background: #fff;
  border: 1px solid var(--gc8-border);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  padding: 16px;
}

/* Title block */
.gc8-title{
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 6px 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e0ecff, #ffffff);
  border: 1px solid #dbeafe;
}

.gc8-sub{
  font-size: 13px;
  color: var(--gc8-muted);
  margin: 6px 0 14px 0;
  line-height: 1.55;
}

/* Input layout */
.gc8-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media(min-width:768px){
  .gc8-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.gc8-field label{
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.gc8-field input,
.gc8-field select{
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: 0.15s ease;
}

.gc8-field input:focus,
.gc8-field select:focus{
  border-color: var(--gc8-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.gc8-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc8-slider{
  width: 100%;
}

/* Buttons */
.gc8-buttons{
  display:flex;
  flex-wrap: wrap;
  gap:8px;
  margin-top: 6px;
}

.gc8-btn{
  border:1px solid var(--gc8-accent);
  background: var(--gc8-accent);
  color:#fff;
  padding:8px 10px;
  font-size:13px;
  border-radius: 10px;
  cursor:pointer;
  transition: 0.15s ease;
  box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}
.gc8-btn.secondary{
  background:#fff;
  color: var(--gc8-accent);
  box-shadow: none;
}
.gc8-btn:hover{
  transform: translateY(-1px);
}
.gc8-btn:active{
  transform: translateY(1px);
}

/* Accordion */
.gc8-accordion{
  margin-top: 12px;
  padding: 6px 8px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px dashed var(--gc8-border);
}
.gc8-accordion summary{
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  padding: 6px 0;
  color: #0f172a;
}

/* Results */
.gc8-results{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media(min-width:768px){
  .gc8-results{
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.gc8-metric{
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  color: #fff;
}

/* Dark Background Metric Cards */
.gc8-metric:nth-child(1){
  background: #1d4ed8; /* deep blue */
}
.gc8-metric:nth-child(2){
  background: #047857; /* deep green */
}
.gc8-metric:nth-child(3){
  background: #6d28d9; /* deep violet */
}

.gc8-metric .label{
  font-size: 12px;
  color: #e5e7eb;
  opacity: .9;
  margin-bottom: 4px;
  font-weight: 700;
}
.gc8-metric .value{
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

/* Breakup */
.gc8-breakup{
  margin-top: 10px;
  border-top: 1px dashed var(--gc8-border);
  padding-top: 10px;
  font-size: 14px;
}
.gc8-breakup .row{
  display:flex;
  justify-content: space-between;
  padding: 6px 0;
}
.gc8-breakup .row.total{
  font-weight: 900;
  border-top: 2px solid #dbeafe;
  margin-top: 6px;
  padding-top: 10px;
  color: #0f172a;
}

/* Note box */
.gc8-note{
  margin-top: 12px;
  background: var(--gc8-accent-soft);
  border-left: 4px solid var(--gc8-accent);
  padding: 10px 12px;
  font-size: 12px;
  color:#0f172a;
  border-radius: 10px;
  line-height: 1.55;
}

/* Compare box */
.gc8-compare{
  margin-top: 10px;
  border: 1px solid var(--gc8-border);
  border-radius: 12px;
  padding: 10px;
  background: #fffdf5;
}
.gc8-compare h4{
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 900;
}
.gc8-compare .compare-row{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:8px;
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px dashed #eee;
}
.gc8-compare .compare-row:first-of-type{
  border-top: none;
  font-weight: 800;
}

/* Errors */
.gc8-error{
  color:#b91c1c;
  font-size: 12px;
  margin-top: 4px;
  display:none;
}
