/* Base styles */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f7f7f9;
  color: #222;
  margin: 0;
  padding: 0;
}

main {
  max-width: 600px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 2rem 1.5rem;
}

.logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

@media (max-width: 600px) {
  .logo {
    max-width: 150px;
  }
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #2c3e50;
}

form {
  width: 100%;
}

fieldset {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  padding: 1rem 1rem 0.5rem 1rem;
}

legend {
  font-weight: bold;
  color: #444;
  padding: 0 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

label {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background: #fafbfc;
  transition: border 0.2s;
}

input:focus, select:focus {
  border-color: #0077b6;
  outline: none;
}

input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.5em;
}

.swag-options {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  border-left: 2px solid #e0e0e0;
}

.summary {
  background: #f1f3f6;
  border-radius: 6px;
  padding: 1rem;
  font-size: 1.05rem;
}

.summary p {
  margin: 0.3em 0;
}

.form-actions {
  text-align: center;
  margin-top: 1.5rem;
}

button[type="submit"] {
  background: #0077b6;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.8rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover:not(:disabled), button[type="submit"]:focus:not(:disabled) {
  background: #023e8a;
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button[type="submit"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

#successMessage, #errorMessage {
  text-align: center;
  margin-top: 2rem;
  background: #eafaf1;
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  color: #155724;
}

#errorMessage {
  background: #fff0f0;
  border: 1px solid #f5c2c7;
  color: #842029;
}

@media (max-width: 600px) {
  main {
    padding: 1rem 0.3rem;
  }
  fieldset {
    padding: 0.7rem 0.5rem 0.3rem 0.5rem;
  }
  .summary {
    padding: 0.7rem;
  }
}

input:invalid {
  border-color: #e63946;
}

input:required:invalid {
  background: #fff0f0;
}

label[for]::after {
  content: attr(data-required);
  color: #e63946;
  margin-left: 0.2em;
  font-size: 0.9em;
}
