/* The net/gross salary calculator: the input panel, the summary tiles, the
   deduction breakdown and the twelve-month table. Hero, content sections,
   cards and FAQ all come from tool_page.css. */

/* The starfield behind the hero is an absolutely positioned image at z-index 0,
   so the interactive panels above it need their own stacking context or the
   image swallows every click. */
.ng {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto 56px auto;
  padding: 0 16px;
}

.ng-panel {
  margin-top: 16px;
  padding: 20px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.ng-panel-title {
  margin: 0 0 6px 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.ng-hint {
  margin: 0 0 14px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 22px;
}

/* Declared after .ng-hint: the two classes sit on the same element and the
   later rule is the one that wins. */
.ng-hint--spaced {
  margin: 14px 0 0 0;
}

.ng-field-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

/* Direction switch */

.ng-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.ng-mode {
  flex: 1 1 0;
  padding: 10px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ng-mode.is-active {
  background: #6e00ff;
  color: #fff;
}

/* Inputs */

.ng-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.ng-form--secondary {
  margin-top: 16px;
}

.ng-field {
  display: flex;
  flex-direction: column;
}

.ng-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ng-input,
.ng-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  appearance: none;
}

.ng-input:focus,
.ng-select:focus {
  outline: 2px solid rgba(160, 110, 255, 0.7);
  outline-offset: 1px;
}

.ng-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ng-input--currency {
  padding-right: 46px;
}

.ng-currency {
  position: absolute;
  right: 14px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  pointer-events: none;
}

.ng-select option {
  color: #0d001f;
}

.ng-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
}

.ng-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  cursor: pointer;
}

.ng-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #6e00ff;
}

.ng-notice {
  margin: 14px 0 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 196, 84, 0.35);
  background: rgba(255, 196, 84, 0.1);
  color: #ffd79a;
  font-size: 13px;
  line-height: 20px;
}

/* A copy confirmation never goes inside a button label: the button would
   change width and shove its neighbours sideways. It gets its own row with a
   reserved height instead, so nothing moves when it appears. */
.ng-status {
  min-height: 20px;
  margin: 12px 0 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 20px;
}

.ng-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Summary */

.ng-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ng-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.ng-summary-item--accent {
  border-color: rgba(160, 110, 255, 0.5);
  background: rgba(110, 0, 255, 0.22);
}

.ng-summary-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.ng-summary-value {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 32px;
}

.ng-summary-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 18px;
}

/* Breakdown */

.ng-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

.ng-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.ng-row--total {
  border-bottom: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.ng-row-value {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ng-row--credit .ng-row-value {
  color: #8ee6a8;
}

/* Twelve-month table */

.ng-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ng-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ng-table th,
.ng-table td {
  padding: 9px 10px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.09);
}

.ng-table th {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  text-align: right;
}

.ng-table td {
  color: rgba(255, 255, 255, 0.82);
}

.ng-table th:first-child,
.ng-table td:first-child {
  text-align: left;
}

.ng-table tbody tr.is-step td {
  background: rgba(110, 0, 255, 0.16);
}

.ng-table tfoot td {
  color: #fff;
  font-weight: 600;
  border-bottom: none;
  border-top: 0.5px solid rgba(255, 255, 255, 0.2);
}

.ng-rate {
  display: inline-block;
  min-width: 38px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.ng-rate.is-step {
  background: rgba(160, 110, 255, 0.32);
  color: #fff;
}

.ng-legend {
  margin: 12px 0 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 19px;
}

.ng-params {
  margin: 14px 0 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 19px;
}

@media (max-width: 900px) {
  .ng-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .ng-field--amount {
    grid-column: 1 / -1;
  }

  .ng-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ng-form {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Two tiles across a phone leaves about 74px for a figure that wants 126:
     the amounts spilled out of their boxes. One per row instead. */
  .ng-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .ng-breakdown {
    grid-template-columns: minmax(0, 1fr);
  }

  .ng-modes {
    flex-direction: column;
    border-radius: 16px;
  }

  .ng-mode {
    border-radius: 12px;
  }
}

/* Where the numbers came from, and what they are not. The tool states a figure
   to the kuruş, which reads more authoritative than a hand-maintained table
   deserves -- so the sources and the limits travel with it. */
.ng-sources {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
}

.ng-sources-title {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.ng-sources ul {
  margin: 0;
  padding-left: 18px;
}

.ng-sources li {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  line-height: 20px;
}

.ng-disclaimer {
  margin: 14px 0 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  line-height: 20px;
}

.ng-hirex {
  margin: 40px 0 8px 0;
}
