/* Import Beer CSS - A lightweight Material Design framework */
@import "https://cdn.jsdelivr.net/npm/beercss@3.5.1/dist/cdn/beer.min.css";

/* Custom Overrides & Layout Logic */
body {
  background-color: #f0f2f5; /* Light gray background for contrast */
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

/* Fix for Color Inputs to make them clickable boxes */
/* Fix for Color Inputs to make them clickable boxes */
input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    height: 3.5rem !important;
    width: 100%;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--outline, #79747e) !important; /* Force border to match Material theme */
    border-radius: 4px;
    padding: 4px;
    margin-top: 0.5rem; /* Space from label */
}

/* Label styling for independent inputs (not inside .field) */
.grid > div > label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--on-surface-variant);
}

/* Ensure the internal color swatch fills the box */
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

/* Main Card Container */
main.responsive {
  max-width: 800px;
  width: 100%;
  margin: auto;
}

/* Header Styling */
header {
  margin-bottom: 2rem;
  text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

header nav {
    justify-content: center;
}

/* Form Styling Enhancements */
.field.label {
    margin-bottom: 1rem;
}

/* Result Section */
#result {
  margin-top: 2rem;
  text-align: center;
  padding: 2rem;
  background: var(--surface-container-low);
  border-radius: var(--radius-l);
}

/* QR Code Display */
#qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

#qrcode img {
    border-radius: var(--radius-m);
    box-shadow: var(--elevation-2);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
