/* SoccerRecruitIQ auth overlay — standalone widget layered on top of React app.
   Uses its own CSS reset scope (`.sriq-auth-*` prefix) so it doesn't collide
   with the bundled app's styles. */

:root {
  --sriq-primary: #0ea5e9;
  --sriq-primary-hover: #0284c7;
  --sriq-danger: #dc2626;
  --sriq-success: #16a34a;
  --sriq-text: #0f172a;
  --sriq-text-muted: #64748b;
  --sriq-border: #e2e8f0;
  --sriq-bg: #ffffff;
  --sriq-bg-hover: #f8fafc;
  --sriq-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Top-right auth widget */
.sriq-auth-widget {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1;
}

.sriq-auth-widget button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  transition: all 150ms ease;
}

.sriq-auth-widget button:hover { transform: translateY(-1px); }
.sriq-auth-widget button:active { transform: translateY(0); }

.sriq-auth-signin-btn {
  background: var(--sriq-primary);
  color: white;
  box-shadow: 0 2px 4px rgb(14 165 233 / 0.3);
}
.sriq-auth-signin-btn:hover { background: var(--sriq-primary-hover); }

.sriq-auth-user-menu {
  display: none;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--sriq-border);
  border-radius: 10px;
  padding: 6px 8px 6px 12px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.06);
}
.sriq-auth-user-menu.active { display: flex; }
.sriq-auth-user-email {
  color: var(--sriq-text);
  font-size: 13px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sriq-auth-logout-btn {
  background: transparent;
  color: var(--sriq-text-muted);
  padding: 6px 10px !important;
  font-size: 12px !important;
}
.sriq-auth-logout-btn:hover {
  background: var(--sriq-bg-hover);
  color: var(--sriq-danger);
}

/* Modal backdrop + card */
.sriq-auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgb(15 23 42 / 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'Inter', -apple-system, sans-serif;
  animation: sriq-fade-in 150ms ease;
}
.sriq-auth-modal.active { display: flex; }
@keyframes sriq-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sriq-auth-card {
  background: var(--sriq-bg);
  border-radius: 16px;
  box-shadow: var(--sriq-shadow);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  animation: sriq-slide-up 200ms ease;
}
@keyframes sriq-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sriq-auth-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--sriq-text);
  letter-spacing: -0.02em;
}
.sriq-auth-card .sriq-auth-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--sriq-text-muted);
}

.sriq-auth-form { display: flex; flex-direction: column; gap: 16px; }
.sriq-auth-field { display: flex; flex-direction: column; gap: 6px; }
.sriq-auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--sriq-text);
}
.sriq-auth-field input {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--sriq-border);
  border-radius: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  background: white;
  color: var(--sriq-text);
}
.sriq-auth-field input:focus {
  outline: none;
  border-color: var(--sriq-primary);
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.15);
}

.sriq-auth-submit {
  background: var(--sriq-primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
  margin-top: 4px;
}
.sriq-auth-submit:hover:not(:disabled) { background: var(--sriq-primary-hover); }
.sriq-auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.sriq-auth-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--sriq-text-muted);
}
.sriq-auth-switch a {
  color: var(--sriq-primary);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.sriq-auth-switch a:hover { text-decoration: underline; }

.sriq-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--sriq-text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.sriq-auth-close:hover { background: var(--sriq-bg-hover); color: var(--sriq-text); }

.sriq-auth-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.sriq-auth-alert.error {
  background: rgb(220 38 38 / 0.08);
  color: var(--sriq-danger);
  border: 1px solid rgb(220 38 38 / 0.2);
}
.sriq-auth-alert.success {
  background: rgb(22 163 74 / 0.08);
  color: var(--sriq-success);
  border: 1px solid rgb(22 163 74 / 0.2);
}

.sriq-auth-card {
  position: relative;
}

/* Small mobile tweaks */
@media (max-width: 480px) {
  .sriq-auth-widget { top: 12px; right: 12px; }
  .sriq-auth-signin-btn { padding: 8px 12px; font-size: 13px; }
  .sriq-auth-card { padding: 24px 20px; }
  .sriq-auth-card h2 { font-size: 20px; }
}
