/* ======================
   AUTH.CSS (gemensam stil för login/signup/reset/etc.)
   ====================== */

/* Färgtema */
:root {
  --bg-grad-from: #ff3b30;
  --bg-grad-mid:  #ff5e13;
  --bg-grad-to:   #ff8c00;

  --card: #fff;
  --text: #222;
  --muted: #555;

  --primary: #ff9800;
  --primary-hover: #e67c00;

  --accent: #ff5e13;
  --focus: #1a73e8;
  --ring: 0 0 0 3px rgba(26,115,232,.28);

  --border: #dcdcdc;
  --shadow: 0 6px 20px rgba(0,0,0,.15);
  --danger: #c62828;
  --success: #2e7d32;
  --danger-bg: #fdecea;
  --success-bg: #e9f7ef;
}

@media (prefers-color-scheme: dark){
  :root {
    --card:#0f1420;
    --text:#e9eef6;
    --muted:#b8c2cc;
    --border:#273048;
    --shadow:0 10px 28px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

/* Bakgrund & layout */
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(90deg, var(--bg-grad-from) 0%, var(--bg-grad-mid) 45%, var(--bg-grad-to) 100%);
  font-family: Arial, sans-serif;
  color: var(--text);
}

/* Hero (för hamburgaren) */
.hero { position: relative; min-height: 56px; }

/* Huvudinnehåll */
.auth-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

/* Kort */
.auth-card {
  background: var(--card);
  border-radius: 14px;
  padding: 2rem;
  width: min(420px, 92%);
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeIn .6s ease;
}

.auth-card h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  color: var(--accent);
}

/* Formulär */
.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  font-weight: 700;
  margin-bottom: .45rem;
  display: block;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
@media (prefers-color-scheme: dark){
  .form-group input{ background:#0a0f1a; }
}
.form-group input:focus {
  border-color: var(--focus);
  box-shadow: var(--ring);
  outline: none;
}
.form-group input.input-error {
  border-color: var(--danger);
  background: var(--danger-bg);
}

/* Knappar */
.btn-auth {
  display: block;
  width: 100%;
  padding: .95rem 1rem;
  background: var(--primary);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .15s, border-color .15s;
  margin-top: .25rem;
}
.btn-auth:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--focus);
}
.btn-auth:disabled,
.btn-auth[disabled] {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* Meddelanden */
.auth-message {
  margin-top: .85rem;
  font-weight: 600;
  text-align: center;
}
.auth-message.error {
  color: var(--danger);
  background: var(--danger-bg);
  padding: .6rem .75rem;
  border-radius: 10px;
}
.auth-message.success {
  color: var(--success);
  background: var(--success-bg);
  padding: .6rem .75rem;
  border-radius: 10px;
}

/* Extra länkar & footer */
.extra-links {
  margin-top: 1rem;
  font-size: .95rem;
  color: var(--muted);
}
.extra-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.extra-links a:hover { text-decoration: underline; }

.site-footer {
  text-align: center;
  padding: 1rem;
  background: #fff;
  color: #444;
  font-size: 0.9rem;
  margin-top: auto;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* Google OAuth button (brand-inspired) */
.oauth-divider{
  display:flex;align-items:center;gap:.75rem;margin:1.15rem 0;color:var(--muted)
}
.oauth-divider::before,.oauth-divider::after{
  content:"";flex:1;height:1px;background:#e5e7eb
}
.btn-oauth{
  --g-border:#dadce0;
  --g-focus:#1a73e8;
  display:flex;align-items:center;justify-content:center;gap:.6rem;
  width:100%;
  min-height:52px;
  padding:.9rem 1.25rem;
  border:1px solid var(--g-border);
  border-radius:12px;
  background:#fff;
  color:#3c4043;
  text-decoration:none;
  font-weight:800;
  font-size:1.05rem;
  box-shadow:0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  transition:box-shadow .15s, transform .12s, background .15s, border-color .15s;
}
.btn-oauth:hover{background:#f6f9fe;box-shadow:0 2px 6px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15);transform:translateY(-1px)}
.btn-oauth:active{transform:translateY(0)}
.btn-oauth:focus-visible{outline:none;box-shadow:var(--ring);border-color:var(--g-focus)}
.btn-oauth svg{flex:0 0 auto}

/* Små skärmar */
@media (max-width:480px){
  .auth-card { padding: 1.5rem; border-radius: 12px; }
}

/* Minskad rörelse */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
