/* index.css — dark theme */
* {
  box-sizing: border-box;
}
body {
  font-family: system-ui, sans-serif;
  background: #0d1117;
  /* deep dark background */
  color: #e6edf3;
  /* light text */
  margin: 0;
  padding: 2rem 5vw;
  text-align: center;
}

h1 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #f0f6fc;
}

p {
  color: #8b949e;
  margin-top: 0;
}

#qrcode {
  display: inline-block;
  background: #ffffff;
  /* white square for QR visibility */
  border: 8px solid #000000;
  /* thick black border to aid scanning */
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08);
}

#error {
  color: #f85149;
  /* red for errors */
  margin-top: 1rem;
  font-weight: bold;
}

code {
  background: #161b22;
  color: #e6edf3;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

form {
  max-width: 480px;
  margin: 1.5rem auto 0;
  background: #161b22;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.08);
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 1.5rem;
  text-align: left;
  color: #e6edf3;
}

input {
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #e6edf3;
  margin-top: 0.3rem;
}

input.invalid {
  border-color: #f85149;
  background-color: #3f1f1f;
}

details {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #8b949e;
}

details summary {
  cursor: pointer;
  color: #58a6ff;
  font-weight: 500;
}

details p {
  margin: 0.3rem 0 0 0.8rem;
  color: #8b949e;
}

button {
  background: #238636;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  font-size: 1rem;
}

button:hover {
  background: #2ea043;
}

/* Container */
.switch {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 24px;
  margin-right: 10px;
}

/* Hide the default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  width: 50px;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider+.label {
  margin-left: 50px;
}

/* The circle inside */
.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* Checked state */
input:checked+.slider {
  background-color: #4caf50;
}

input:checked+.slider::before {
  transform: translateX(26px);
}

/* Optional: add some text next to the switch */
.toggle-row label {
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* SEPA preview styles */
.sepa-form {
  width: 90vw;
  max-width: 480px;
  min-width: 320px;
  margin: 1.5rem auto;
  display: block;
  background-color: #1e1e1e;
  /* dark background */
  color: #eee;
  /* light text */
  border: 2px solid #444;
  border-radius: 8px;
  padding: 16px;
  font-family: sans-serif;
}

.sepa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.sepa-title {
  font-weight: bold;
  font-size: 1.2em;
  text-align: left;
}

.sepa-amount {
  font-weight: bold;
  font-size: 1.4em;
  text-align: right;
}

.sepa-section {
  margin-bottom: 12px;
}

.sepa-label {
  font-size: 0.85em;
  color: #aaa;
  margin-bottom: 4px;
  text-align: left;
  /* left-align labels */
}

.sepa-field {
  background-color: #1e1e1e;
  /* dark theme background */
  color: #ccc;
  /* light gray text */
  padding: 4px 6px;
  margin-bottom: 0.8em;
  border: 1px solid #444;
  border-radius: 3px;
  min-height: 2em;
  /* ensures empty blocks have same height */
  display: flex;
  align-items: center;
  /* vertically center content */
}
.sepa-section.sepa-section--buttons{
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
@media screen and (min-width: 480px) {
  .sepa-section.sepa-section--buttons{
    grid-template-columns: repeat(2, 1fr);
  }
}
.sepa-section.sepa-section--buttons .button{
  flex: 1;
  width: 100%;
  justify-content: center;
}

.button.button--start-icon {
  display: flex;
  align-items: center;
}

.button.button--start-icon svg {
  height: 1.2rem;
  width: 1.2rem;
  margin: 0 0.6em;
}

.button{
  padding: 0.75rem calc(1.5rem + 1.2rem) 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 0.5rem;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.25);
  text-decoration: none;
}
.button:hover {
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
  transform: scale(1.03);
}

.button:active {
  transform: scale(1);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.25);
}

@media screen and (min-width: 480px) {
  #shareLink{
    grid-column: span 2;
  }
}
/* Edit Button – Neon Purple Outline */
#editLink {
  background: rgba(124, 58, 237, 0.25); /* frosted purple */
  border: 2px solid #7c3aed;           /* solid purple border */
  color: #ffffff;                       /* readable white text */
  box-shadow: 0 4px 10px rgba(124,58,237,0.2);
}
#editLink:hover {
  background: rgba(124, 58, 237, 0.45);
  border-color: #a855f7;
  box-shadow: 0 6px 14px rgba(124,58,237,0.3);
}

/* --- SVG Button --- */
#svgLink {
  background: rgba(6, 182, 212, 0.25); /* frosted cyan */
  border: 2px solid #06b6d4;           /* solid cyan border */
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(6,182,212,0.2);
}
#svgLink:hover {
  background: rgba(6, 182, 212, 0.45);
  border-color: #0ea5e9;
  box-shadow: 0 6px 14px rgba(6,182,212,0.3);
}

/* --- Share Button --- */
#shareLink {
  background: rgba(52, 211, 153, 0.25); /* frosted mint/green */
  border: 2px solid #10b981;           /* solid mint border */
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(52,211,153,0.2);
}
#shareLink:hover {
  background: rgba(52, 211, 153, 0.45);
  border-color: #22c55e;
  box-shadow: 0 6px 14px rgba(52,211,153,0.3);
}


#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  background: rgba(30, 41, 59, 0.85); /* frosted dark */
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease, fadeOut 0.4s ease 3.6s forwards;
}
.toast.toast--success { border-color: #10b981; }
.toast.toast--error { border-color: #ef4444; }
.toast.toast--info { border-color: #0ea5e9; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}