@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Open+Sans:wght@400;600&display=swap');

.ccy-calc-container {
  margin: 20px auto;
  max-width: 900px;
  padding: 0;
  color: #111;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.ccy-calc-lead {
  margin: 0;
  padding: 18px 25px;
  padding-left: 25px !important;
  padding-right: 25px !important;
  background: #f0f7fc;
  border-bottom: 1px solid #000;
  font-size: 14px;
  line-height: 1.6;
}

.ccy-calc-form {
  padding: 28px 25px;
  padding-left: 0px !important;
  padding-right: 0px !important;
  background: #fff;
}

.ccy-calc-section {
  padding: 22px 25px;
  padding-left: 25px !important;
  padding-right: 25px !important;
  margin-bottom: 20px;
  background: #f8f8f8;
  border: 1px solid #000;
  border-radius: 3px;
  box-sizing: border-box;
}

.ccy-calc-section--inset {
  margin-top: 0;
}

.ccy-calc-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  margin: 0 0 14px;
  text-align: center !important;
  font-weight: 600;
}

.ccy-calc-input-group {
  margin-bottom: 0;
}

.ccy-calc-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  color: #000;
}

.ccy-calc-input {
  padding: 12px 14px;
  border: 2px solid #000;
  border-radius: 6px;
  font-size: 18px;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.ccy-calc-input-wide {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.ccy-calc-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #555;
  text-align: center !important;
  font-style: italic;
}

.ccy-calc-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: stretch;
}

.ccy-calc-choice-group--wrap {
  justify-content: center;
}

.ccy-calc-choice-btn {
  flex: 1 1 220px;
  max-width: 100%;
  padding: 12px 14px;
  border: 2px solid #000;
  color: #000;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center;
}

.ccy-calc-choice-btn:hover {
  background: #eee;
}

.ccy-calc-choice-btn.active {
  background: #000;
  color: #fff !important;
}

.ccy-calc-choice-group[data-ccy-choice-group='sex'] {
  flex-wrap: nowrap;
  justify-content: center;
}

.ccy-calc-choice-group[data-ccy-choice-group='sex'] .ccy-calc-choice-btn {
  flex: 0 0 auto;
  min-width: 48px;
  padding-left: 22px;
  padding-right: 22px;
}

.ccy-calc-button {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 8px auto 0;
  padding: 16px 28px;
  background: #000;
  color: #fff !important;
  border: 1px solid #000;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ccy-calc-button:hover {
  background: #fff;
  color: #000 !important;
}

.ccy-calc-button-secondary {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
}

.ccy-calc-button-secondary:hover {
  background: #000 !important;
  color: #fff !important;
}

.ccy-calc-progress-container {
  padding: 24px 25px;
  padding-left: 25px !important;
  padding-right: 25px !important;
  background: #fff;
}

.ccy-calc-progress-bar {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}

.ccy-calc-progress-fill {
  height: 100%;
  width: 0%;
  background: #000;
  border-radius: 2px;
}

.ccy-calc-warning {
  margin: 16px 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 14px 25px;
  padding-left: 25px !important;
  padding-right: 25px !important;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-size: 14px;
  color: #856404;
}

.ccy-calc-result {
  padding: 0 0 0 24px;
  padding-left: 0px !important;
  padding-right: 0px !important;
  border-top: 2px solid #eee;
  background: #fff;
}

.ccy-calc-result > .ccy-calc-section {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.ccy-calc-safety {
  margin: 20px 0 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 16px 0;
  padding-left: 10px !important;
  padding-right: 10px !important;
  background: #fde8e8;
  border: 1px solid #c0392b;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: #1a1a1a;
}

.ccy-calc-result-main {
  margin: 20px 0 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 20px !important;
  padding: 22px 0;
  padding-left: 10px !important;
  padding-right: 10px !important;
  text-align: center;
  background: #f8f8f8;
  border: 1px solid #000;
  border-radius: 6px;
}

.ccy-calc-result-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  font-weight: 600;
  text-align: center !important;
}

.ccy-calc-result-fc {
  margin: 0 0 14px;
  line-height: 1.1;
  text-align: center !important;
}

.ccy-calc-result-fc-value {
  font-size: clamp(40px, 10vw, 56px);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #000;
}

.ccy-calc-result-fc-unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: #444;
  margin-left: 6px;
}

.ccy-calc-result-text {
  margin: 0 0 14px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  font-size: 14px;
  text-align: left;
  color: #333;
  max-width: none;
}

.ccy-calc-formula-reminder {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: #444;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center !important;
}

.ccy-calc-muted {
  margin: 0 0 16px;
  font-size: 13px;
  color: #444;
  text-align: center;
}

.ccy-calc-table-wrap {
  overflow-x: auto;
}

.ccy-calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ccy-calc-table th,
.ccy-calc-table td {
  padding: 10px 12px;
  border: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
}

.ccy-calc-table thead th {
  background: #eee;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ccy-calc-table tbody th {
  font-weight: 600;
  background: #fafafa;
  width: 48%;
}

.ccy-calc-zone-name {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: #555;
  margin-top: 4px;
}

.ccy-calc-blocks {
  margin: 0 !important;
  margin-left: 10px !important;
  margin-right: 10px !important;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ccy-calc-block {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 16px 0;
  padding-left: 10px !important;
  padding-right: 10px !important;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.55;
}

.ccy-calc-block--ux {
  background: #f9f9f9;
}

.ccy-calc-block--sources {
  font-size: 13px;
  color: #333;
}

.ccy-calc-block-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  margin: 0 0 10px;
  font-weight: 600;
}

.ccy-calc-block p {
  margin: 0;
}

.ccy-calc-list {
  margin: 0;
  padding-left: 1.2em;
}

.ccy-calc-list li {
  margin-bottom: 8px;
}

.ccy-calc-list li:last-child {
  margin-bottom: 0;
}

.ccy-calc-list--compact li {
  margin-bottom: 6px;
}

.ccy-calc-list--sources {
  list-style: disc;
}

.ccy-calc-result-actions {
  margin: 24px 0 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0;
  text-align: center;
}

.ccy-calc-method-fieldset {
  border: none;
  margin: 0 0 8px;
  padding: 0 0 4px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

.ccy-calc-method-legend {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  padding: 0 25px;
  margin: 0 0 12px;
}

.ccy-calc-method-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.ccy-calc-method-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 2px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.ccy-calc-method-card:hover:not(:has(.ccy-calc-method-input:checked)) {
  background: #fafafa;
  border-color: #b8b8b8;
}

.ccy-calc-method-card:has(.ccy-calc-method-input:checked) {
  background: #f3f3f3;
  border-color: #000;
}

.ccy-calc-method-card:has(.ccy-calc-method-input:checked):hover {
  border-color: #000;
}

.ccy-calc-method-card:has(.ccy-calc-method-input:focus-visible) {
  outline: 2px solid #0d47a1;
  outline-offset: 4px;
}

.ccy-calc-method-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ccy-calc-method-card-inner {
  display: block;
  padding: 14px 16px;
}

.ccy-calc-method-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.ccy-calc-method-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  line-height: 1.3;
}

.ccy-calc-method-desc {
  display: block;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  margin: 0;
}

.ccy-calc-method-tag {
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #000;
}

.ccy-calc-method-tag--high {
  background: #000;
  color: #fff !important;
}

.ccy-calc-method-tag--mid {
  background: #fff;
  color: #000;
}

.ccy-calc-method-tag--low {
  background: #fff;
  color: #666;
  border-color: #999;
}

.ccy-calc-method-hint {
  margin-top: 12px !important;
  margin-bottom: 0 !important;
  padding: 0 25px;
}

.ccy-calc-panel {
  display: none !important;
}

.ccy-calc-panel.is-active {
  display: block !important;
}

.ccy-calc-select {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 14px;
  border: 2px solid #000;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  box-sizing: border-box;
}

.ccy-calc-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: center;
}

.ccy-calc-input-row .ccy-calc-input-group {
  flex: 0 1 auto;
}

.ccy-calc-advanced {
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid #ccc;
}

.ccy-calc-advanced summary {
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  list-style: none;
}

.ccy-calc-advanced summary::-webkit-details-marker {
  display: none;
}

.ccy-calc-fc-warning {
  margin: 0 0 16px !important;
  padding: 12px 14px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-size: 13px;
  color: #856404;
}

.ccy-calc-result-grid {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 12px 28px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  text-align: center;
  font-size: 14px;
  box-sizing: border-box;
}

.ccy-calc-result-grid dt {
  margin: 0;
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.ccy-calc-result-grid dd {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  text-align: center;
}

@media (max-width: 600px) {
  .ccy-calc-lead,
  .ccy-calc-form,
  .ccy-calc-section,
  .ccy-calc-progress-container,
  .ccy-calc-warning,
  .ccy-calc-result,
  .ccy-calc-safety,
  .ccy-calc-result-main,
  .ccy-calc-block {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .ccy-calc-choice-group:not([data-ccy-choice-group='sex']) {
    flex-direction: column;
  }

  .ccy-calc-choice-group:not([data-ccy-choice-group='sex']) .ccy-calc-choice-btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .ccy-calc-choice-group[data-ccy-choice-group='sex'] {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .ccy-calc-choice-group[data-ccy-choice-group='sex'] .ccy-calc-choice-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 44px;
    max-width: 120px;
  }

  .ccy-calc-method-fieldset {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ccy-calc-method-legend,
  .ccy-calc-method-hint {
    padding-left: 15px;
    padding-right: 15px;
  }

  .ccy-calc-result-grid {
    grid-template-columns: 1fr;
    width: 100%;
    justify-content: stretch;
    justify-items: center;
  }

  .ccy-calc-result-grid dt,
  .ccy-calc-result-grid dd {
    max-width: 100%;
  }
}
