/* Box Sizing & Tool Wrapper */
.fc-tool-wrapper,
.fc-tool-wrapper *,
.fc-tool-wrapper *::before,
.fc-tool-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.fc-tool-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 35px auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(10, 61, 98, 0.06);
  border: 1px solid #e2e8f0;
  color: #0f172a;
  display: block;
}

/* Header Section */
.fc-tool-header {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.fc-tool-title {
  color: #0a3d62;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
}

.fc-tool-subtitle {
  color: #64748b;
  font-size: 15px;
  font-weight: 500;
}

/* Form Layout */
.fc-emi-form {
  width: 100%;
  margin: 0;
}

.fc-emi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.fc-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  padding: 16px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  width: 100%;
  transition: border-color 0.2s ease;
}

.fc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fc-label {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
}

.fc-required {
  color: #dc2626;
}

/* Input Wrappers & Clean Focus */
.fc-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}


.fc-input-wrap:focus-within {
  border-color: #0a3d62;
  box-shadow: 0 0 0 3px rgba(10, 61, 98, 0.15);
}

.fc-prefix,
.fc-suffix {
  background: #f1f5f9;
  padding: 10px 12px;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
  user-select: none;
  white-space: nowrap;
  border: none;
}

.fc-prefix {
  border-right: 1.5px solid #cbd5e1;
}

.fc-suffix {
  border-left: 1.5px solid #cbd5e1;
}

.fc-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  -moz-appearance: textfield;
}

.fc-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.fc-input::-webkit-outer-spin-button,
.fc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Field Error */
.fc-input-group.is-invalid {
  border-color: #dc2626;
}

.fc-input-group.is-invalid .fc-input-wrap {
  border-color: #dc2626;
}

.fc-field-error {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2px;
}

/* Results Section */
.fc-results-wrapper {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px dashed #e2e8f0;
  animation: fcFadeIn 0.3s ease-in-out;
}

/* Hero EMI Box */
.fc-emi-hero-card {
  background-color: #0a3d62;
  color: #ffffff;
  padding: 12px 10px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(10, 61, 98, 0.15);
}

.fc-emi-hero-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  font-weight: 700;
  display: block;
}

.fc-emi-hero-amount {
  font-size: 34px;
  font-weight: 800;
  color: #34d399;
  margin: 6px 0;
  line-height: 1.2;
}

.fc-emi-hero-sub {
  font-size: 13px;
  color: #bfdbfe;
  font-weight: 600;
}

/* Progress Payment Bar */
.fc-payment-bar-wrap {
  margin: 0 0 20px;
}

.fc-payment-bar {
  height: 7px;
  border-radius: 999px;
  background: #f59e0b;
  overflow: hidden;
}

.fc-payment-bar > span {
  display: block;
  height: 100%;
  background: #0a3d62;
  transition: width 0.2s ease;
}

.fc-payment-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
}

.fc-payment-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fc-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.fc-dot-principal {
  background: #0a3d62;
}

.fc-dot-interest {
  background: #f59e0b;
}

/* 3 Breakdown Cards Grid */
.fc-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.fc-res-card {
  background-color: #0a3d62;
  color: #ffffff;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.fc-card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin-bottom: 6px;
  font-weight: 700;
  color: #ffffff;
}

.fc-single-val {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  display: block;
}

.fc-val-interest {
  color: #fde047;
}

/* Disclaimer */
.fc-disclaimer {
  font-size: 12.5px;
  color: #64748b;
  text-align: justify;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: 24px;
}

@keyframes fcFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .fc-emi-grid,
  .fc-results-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fc-tool-wrapper {
    padding: 14px;
  }

  .fc-tool-title {
    font-size: 22px;
  }

  .fc-emi-hero-amount {
    font-size: 28px;
  }
}