@view-transition {
    navigation: auto;
}

body {
    font-family: sans-serif;
    background: #f9f9f9;
    color: #111;
    padding: 2rem;
    color-scheme: light;
}

p, .helper span {
    line-height: 1.4;
}

.form-container,
#bear {
    max-width: 450px;
    margin: 0 auto;
}

#bear {
    text-align: right;
    box-sizing: border-box;
    padding-right: 20px;
}

.form-container {
    margin-top: -7px;
    background: #fff;
    padding: 2.5rem;
    border-radius: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

label {
    display: block;
    margin-top: 1rem;
    /* font-weight: bold; */
}

input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #111;
    box-sizing: border-box;
}

.subdomain-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.subdomain-wrapper span {
    white-space: nowrap;
    color: #555;
    font-size: 0.9rem;
}

.helper {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.helper-icon {
    aspect-ratio: 1;
    font-weight: bold;
    border: 1px solid #aaa;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

button {
    background: var(--color-brand-primary, hsl(200, 0%, 50%));
    color: white;
    padding: 0.7rem 1.15rem;
    border: none;
    border-radius: 28px;
    font-size: 1rem;
    /* margin-top: 1.5rem; */
    cursor: pointer;
}

button:hover {
    background: var(--color-brand-primary-hover, hsl(200, 0%, 33%));
}

button:disabled {
    background: #7b7b7b6e !important;
    cursor: not-allowed;
}

h2 {
    margin-top: 0;
}

input {
    font-size: 1rem;
}

#subdomain-message {
    display: none;
    color: green;
    margin-top: 0.5rem;
}

.spacer {
    height: 1rem;
}

a:link, a:visited {
    color: var(--color-brand-primary, hsl(200, 0%, 50%));
    text-decoration: none;
    font-weight: 500;
}

.no-suggestions-found {
    font-weight: 500;
    opacity: 0.8;
}

a.faded {
    
    text-decoration: none;
    text-decoration-color: hsla(0, 0%, 50%, .2);
    /* font-size: 0.9rem; */
    color: hsl(0, 0%, 50%);

    opacity: 0.7;
}
a.faded:hover {
    opacity: 1;
}

/* dl styling */
dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    margin-top: 1rem;
}

dt {
    font-weight: bold;
}

dd {
    margin: 0;
    /* padding: 0.5rem 0; */
}


/* Location input */
/* Container styling */
#suggestions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem auto;
  margin-bottom: 1rem;
  max-width: 500px;
  font-family: system-ui, sans-serif;
}

/* Base suggestion style */
.location-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  background-color: #fff;
  color: #222;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.location-suggestion span {
  display: block;
  line-height: 1.3;
  font-weight: 600;
}

.location-suggestion small {
  color: #666;
  font-size: 0.85em;
  transition: color 0.2s ease;
  font-weight: 400;
}

/* Hide native radio input visually */
.location-suggestion input[type="radio"] {
  margin-top: 0.3rem;
  accent-color: hsl(200, 100%, 50%);
}

/* Hover effect */
.location-suggestion:hover {
  border-color: hsl(200, 100%, 50%);
  background-color: #f0f8ff;
}

/* Selected styling using :has (modern only) */
.location-suggestion:has(input[type="radio"]:checked) {
  border-color: hsl(200, 100%, 50%);
  background-color: #f0f8ff;
  color: #0077ff;
}

.location-suggestion:has(input[type="radio"]:checked) small {
  color: hsl(200, 100%, 35%);
}

/* Optional: focus ring for accessibility */
.location-suggestion:focus-within {
  outline: 2px solid hsl(200, 100%, 50%);
  outline-offset: 4px;
}

/* Location input, 🌙 Dark Mode Support 
@media (prefers-color-scheme: dark) {
  .location-suggestion {
    background-color: transparent;
    border-color: hsla(0, 0%, 49%, 0.446);
    color: #ddd;
  }

  .location-suggestion small {
    color: #aaa;
  }

  .location-suggestion:hover {
    background-color: hsl(200, 29%, 35%);
    border-color: hsl(200, 100%, 60%);
    color: #fff;
  }

  .location-suggestion:hover small {
    color: hsl(200, 100%, 83%);
  }

  .location-suggestion:has(input[type="radio"]:checked) {
    background-color: hsl(200, 29%, 35%);
    border-color: hsl(200, 100%, 60%);
    color: hsl(200, 100%, 84%);
  }

  .location-suggestion:has(input[type="radio"]:checked) small {
    color: hsl(200, 100%, 75%);
  }

  .location-suggestion input[type="radio"] {
    accent-color: hsl(200, 100%, 60%);
  }

  .location-suggestion:focus-within {
    outline: 2px solid hsl(200, 100%, 60%);
  }

  body {
        background: #121212;
        background: #838383;
        background: #686868;
        color: #eee;
    }

    .form-container {
        background: #1e1e1e;
        background: #494949;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    input[type="email"],
    input[type="text"] {
        background: #2b2b2b;
        background: #626262;
        color: #eee;
        border: 1px solid #555;
    }

    .subdomain-wrapper span,
    .helper {
        color: #bbb;
    }

    .helper-icon {
        border-color: #888;
        color: #eee;
    }

    button {
        background: hsl(200, 66%, 51%);
    }

    button:hover {
        background: hsl(200, 68%, 41%);
    }

    #subdomain-message {
        color: rgb(112, 181, 112);
    }

    a:link, a:visited {
        color: hsl(200, 72%, 59%);
    }
}*/

@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .form-container {
        width: 100%;
        /* border-radius: 0; */
        /* box-shadow: none; */
        padding: 2rem;
    }
}

/* Hide things in print */
@media print {
    .hide-in-print {
        display: none !important;
    }
}