/* ========================================
   Auth Pages – Shared Styles
   Auth Pages – Login / Registration / Password Reset
   ======================================== */
:root {
  --font-sans:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.8;
  color: #4a4a4a;
  background-color: #ffffff;
  min-height: 100vh;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
  color: #003D4E;
}

a:hover {
  color: #00506a;
}

/* ========================================
   Two-Column Auth Layout
   ======================================== */
.auth-page {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Left Column – Info/Hero */
.auth-left {
  width: 58%;
  flex-shrink: 0;
  background: #003D4E;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px;
  position: relative;
  overflow: hidden;
  align-items: center;
  padding-left: 0;
}

.auth-left-inner {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.auth-left-logo {
  margin-bottom: 30px;
}

.auth-left-logo img {
  height: 40px;
  width: auto;
  display: inline-block;
}

.auth-left-content {
  display: flex;
  flex-direction: column;
  gap: 35px;
  max-width: 520px;
}

.auth-left-content h1 {
  font-size: 44px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.auth-left-content p {
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.6;
}

.auth-left-content .auth-note {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.6;
  margin-top: 20px;
}

/* Right Column – Form */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 5%;
  background: #fff;
}

.auth-form-box {
  width: 100%;
  max-width: 467px;
  background: #fff;
  padding: 50px 20px 20px 20px;
  box-shadow: 0px 15px 30px 5px rgba(0, 0, 0, 0.15);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form-box h2 {
  font-size: 26px;
  font-weight: 600;
  color: #333;
  text-align: center;
  line-height: 1;
  margin: 0px 0px 25px 0px;
  padding: 0;
}

/* ========================================
   Form Elements
   ======================================== */
.auth-row {
  margin-bottom: 0;
}

.auth-row input[type="text"],
.auth-row input[type="email"],
.auth-row input[type="password"] {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.8;
  color: #333;
  background: #f3f3f5;
  border: 0.8px solid #ddd;
  border-radius: 5px;
  outline: none;
  min-height: 40px;
  margin-top: 15px;
  transition: border-color 0.2s, background 0.2s;
}

.auth-row input:focus {
  background: #fff;
}

.auth-row input.error {
  border-color: #e74c3c;
  background-color: #fff5f5;
}

/* Password field wrapper with eye icon */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  color: #333;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.password-toggle:hover {
  color: #555;
}

.password-toggle .icon-hide {
  display: none;
}

.password-toggle.showing .icon-show {
  display: none;
}

.password-toggle.showing .icon-hide {
  display: block;
}

/* Field error message */
.field-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* Remember me row */
.auth-remember-row {
  display: block;
  margin-top: 10px;
  margin-bottom: 0;
}

.auth-remember-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #4a4a4a;
  cursor: pointer;
}

.auth-remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #003D4E;
  cursor: pointer;
}

/* Submit Button – exact match to reference */
.auth-btn {
  width: 100%;
  padding: 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background-color: #003D4E;
  border: 0.8px solid #003D4E;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
  display: block;
  line-height: 1;
  letter-spacing: 1.4px;
  margin-top: 30px;
}

.auth-btn:hover {
  background-color: #fff;
  color: #00506a;
  border: 1px solid #00506a;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Full-width link button (Tilmeld dig / Login her) */
.auth-link-btn {
  display: block;
  width: 100%;
  padding: 17px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background-color: #79AAB3;
  border: 0.8px solid #fff;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s;
  margin-top: -10px;
  line-height: 1;
}

.auth-link-btn:hover {
  background-color: #fff;
  color: #00506a;
  border: 1px solid #00506a;
}

.auth-link-btn strong {
  font-weight: 700;
}

/* Centered text link (Glemt kodeord?) */
.auth-center-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #003D4E;
  background: transparent;
  border: none;
  text-decoration: none;
  transition: all 0.3s;
  margin-top: 10px;
  line-height: 1;
}

.auth-center-link:hover {
  color: #00506a;
}

/* Auth message (success/error) */
.auth-message {
  padding: 12px 16px;
  border-radius: 5px;
  font-size: 14px;
  margin-bottom: 0;
  display: none;
}

.auth-message.error {
  display: block;
  background: #fdf2f2;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.auth-message.success {
  display: block;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

/* Loading spinner */
.auth-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: auth-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.auth-spinner--solo {
  margin-right: 0;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Terms Checkbox (Signup)
   ======================================== */
.auth-terms {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-terms input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #003D4E;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-terms label,
.auth-terms span {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.auth-terms a {
  font-weight: 700;
  color: #003D4E;
}

.auth-terms a:hover {
  color: #00506a;
}

/* ========================================
   Back Link (Forgot Password)
   ======================================== */
.auth-back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  color: #003D4E;
}

.auth-back-link:hover {
  color: #00506a;
}

.auth-support-link {
  margin-top: 16px;
  font-size: 13px;
  color: #888;
}

.auth-support-link a {
  color: #003D4E;
}

/* Password strength validation message */
.password-requirements {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  line-height: 1.5;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .auth-page {
    flex-direction: column;
    gap: 0;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    width: 100%;
    margin: 0;
    padding: 40px 24px;
    min-height: 100vh;
  }

  .auth-form-box {
    max-width: 100%;
  }

  /* Show a mobile logo above the form */
  .auth-mobile-logo {
    display: block;
    margin-bottom: 28px;
  }

  .auth-mobile-logo img {
    height: 32px;
    width: auto;
  }
}

@media (min-width: 901px) {
  .auth-mobile-logo {
    display: none;
  }
}

/* ========================================
   Language Switcher (auth pages)
   Positioned top-right of the viewport so it floats above
   the two-column layout on every auth screen.
   ======================================== */
.auth-lang-switcher {
  position: fixed;
  top: 28px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 61, 78, 0.12);
  border-radius: 999px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #4a4a4a;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.auth-lang-btn:hover {
  background: rgba(0, 61, 78, 0.06);
  color: #003D4E;
}

.auth-lang-btn.active {
  background: #003D4E;
  color: #ffffff;
}

.auth-lang-btn:focus-visible {
  outline: 2px solid #003D4E;
  outline-offset: 2px;
}

.auth-lang-flag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}

@media (max-width: 600px) {
  .auth-lang-switcher {
    top: 10px;
    right: 10px;
    padding: 3px;
  }
  .auth-lang-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  .auth-lang-btn span {
    display: none;
  }
  .auth-lang-flag {
    width: 18px;
    height: 18px;
  }
}