/* Last Updated: 07.10.2025 at 14:12 (CEST) */
/* German IBAN Breakdown tool styles */

.iban-tool {
  --iban-font: "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --iban-surface: #ffffff;
  --iban-surface-alt: #f8fafc;
  --iban-surface-muted: #f1f5f9;
  --iban-text: #0f172a;
  --iban-text-muted: #64748b;
  --iban-border: #e2e8f0;
  --iban-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --iban-ring: rgba(37, 99, 235, 0.18);
  --iban-success-bg: #10b981;
  --iban-success-text: #ffffff;
  --iban-warn-bg: #f59e0b;
  --iban-warn-text: #1f2937;
  --iban-error-bg: #f87171;
  --iban-error-text: #1f2937;
  --iban-neutral-bg: #e2e8f0;
  --iban-neutral-text: #1f2937;
  --iban-muted-bg: #e2e8f0;
  font-family: var(--iban-font);
  color: var(--iban-text);
}

html.dark-mode .iban-tool {
  --iban-surface: #151b24;
  --iban-surface-alt: #10151d;
  --iban-surface-muted: #1c2532;
  --iban-text: #e6edf5;
  --iban-text-muted: #9ca3af;
  --iban-border: #27313f;
  --iban-shadow: 0 20px 36px rgba(6, 11, 20, 0.45);
  --iban-ring: rgba(59, 130, 246, 0.28);
  --iban-success-bg: #059669;
  --iban-success-text: #ecfdf5;
  --iban-warn-bg: #d97706;
  --iban-warn-text: #fff7ed;
  --iban-error-bg: #f87171;
  --iban-error-text: #1f2937;
  --iban-neutral-bg: #27313f;
  --iban-neutral-text: #e5e7eb;
  --iban-muted-bg: #1f2937;
}

.iban-tool .tool-description {
  margin: 0 0 1.5rem;
  max-width: 720px;
  color: var(--iban-text-muted);
}

.iban-card {
  background: linear-gradient(180deg, var(--iban-surface-alt), var(--iban-surface));
  border-radius: 20px;
  border: 1px solid var(--iban-border);
  box-shadow: var(--iban-shadow);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  display: grid;
  gap: 2rem;
}

.iban-card-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 720px) {
  .iban-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.iban-input-group {
  flex: 1 1 auto;
}

.iban-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.iban-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.45rem;
  color: var(--iban-text);
}

.iban-input {
  width: 100%;
  border: 1px solid var(--iban-border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--iban-text);
  background: var(--iban-surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iban-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 4px var(--iban-ring);
}

.iban-input::placeholder {
  color: var(--iban-text-muted);
  opacity: 0.7;
}

.iban-actions .btn {
  min-width: 110px;
  justify-content: center;
}

.iban-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .iban-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.iban-field {
  display: grid;
  gap: 0.75rem;
}

.iban-field-control {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.iban-field-control .iban-field-input {
  flex: 1 1 auto;
}

.iban-field-control .btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.iban-field-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--iban-border);
  background: var(--iban-surface);
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--iban-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iban-field-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 4px var(--iban-ring);
}

.iban-hint {
  font-size: 0.85rem;
  color: var(--iban-text-muted);
  margin: 0;
}

.status-section {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.status-section .iban-label {
  justify-self: start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  background: var(--iban-neutral-bg);
  color: var(--iban-neutral-text);
  width: fit-content;
  min-width: 220px;
  margin: 0 auto;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.status-pill.status-success {
  background: var(--iban-success-bg);
  color: var(--iban-success-text);
}

.status-pill.status-warn {
  background: var(--iban-warn-bg);
  color: var(--iban-warn-text);
}

.status-pill.status-error {
  background: var(--iban-error-bg);
  color: var(--iban-error-text);
}

.status-pill.status-muted {
  background: var(--iban-muted-bg);
  color: var(--iban-text);
}

.status-hint {
  font-size: 0.9rem;
  color: var(--iban-text-muted);
  margin: 0;
  text-align: center;
}

.status-hint.status-success {
  color: var(--iban-success-bg);
}

.status-hint.status-warn {
  color: var(--iban-warn-bg);
}

.status-hint.status-error {
  color: var(--iban-error-bg);
}

.iban-card-footer {
  border-top: 1px solid var(--iban-border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.iban-notes {
  margin: 0;
  font-size: 0.9rem;
  color: var(--iban-text-muted);
  max-width: 520px;
}

.iban-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.iban-tip {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--iban-text-muted);
}

.kbd-inline {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--iban-surface-muted);
  color: var(--iban-text);
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.iban-field .btn {
  justify-content: center;
}

.iban-actions .btn[disabled],
.iban-field .btn[disabled],
.iban-footer-actions .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.status-hint.status-muted {
  color: var(--iban-text-muted);
}
