@charset "utf-8";

/* Global styling */
body {
    display: flex;
    flex-direction: column; /* Align items vertically */
    justify-content: center;
    align-items: center;
    background-image: url('../images/background.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    font-family: Arial, sans-serif;
    min-height: 100vh; /* Ensures the body takes the full viewport height */
    margin: 0;
    padding: 0;
}

/* Tailor styles for smaller devices, like an iPhone */
@media only screen and (max-width: 430px) {
    body {
        /* Use safe area insets to ensure content doesn't overlap the notch */
        padding-top: env(safe-area-inset-top);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        
        background-image: url('../images/background.jpg');
        
        /* Adjust the background attachment for mobile compatibility */
        background-attachment: scroll;
        
        /* Optionally, switch background-size to cover so it fills the screen better */
        background-size: cover;
    }
}

.welcome-message {
    font-size: 2.5em;
    margin-top: 20px;
}

/* Link (login-link) styling */
.login-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 1.2em;
    color: white;
    text-decoration: none;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 5px;
}

.login-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Additional text: begrenset maks-bredde og bryt linjer hvis nødvendig */
.additional-text {
    margin-top: 20px;
    max-width: 40%;
    width: 75%;
    font-size: 1em;
    color: white;
    word-wrap: break-word; /* sikrer ordbryting */
}

/* Generell lenke-styling */
a {
    color: white;
    background-color: #B8860B;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Media queries for mindre skjermer */
@media (max-width: 600px) {
    .welcome-message {
        font-size: 1.8em;
        margin-top: 20px;
    }
    
    .login-link {
        font-size: 1em;
        padding: 8px 16px;
    }
    
    .additional-text {
        max-width: 80%;
    }
}

@media (max-width: 400px) {
    .welcome-message {
        font-size: 1.5em;
        margin-top: 20px;
    }
    
    .login-link {
        font-size: 0.9em;
        padding: 6px 12px;
    }
}

/* Spacing for form element groups */
.form-group {
    margin-bottom: 20px;
}

/* Spacing for links below forms */
.back-link {
    margin-top: 25px;
}
/* Register/Login form layout */
form .stacked-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

form .stacked-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 16px;   /* space between rows */
}

form .stacked-field input[type="submit"],
form input[type="submit"] {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
}
/* Register/Login page: taller submit button, keep width auto */
.auth-register form input[type="submit"],
.auth-login form input[type="submit"] {
  width: auto !important;      /* stop any 100% width */
  display: inline-block;
  padding: 14px 22px;          /* ↑ height via vertical padding */
  font-size: 1.05rem;          /* optional: a touch bigger text */
  border-radius: 10px;         /* match your style */
  line-height: 1;              /* keeps padding-driven height crisp */
}

