/* Auth modal layout — no inline styles (CSP style-src without unsafe-inline) */

.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
}

.auth-modal.is-open {
  display: flex;
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 440px;
  width: 100%;
  position: relative;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-modal-close {
  position: absolute;
  top: 11px;
  right: 11px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 10;
}

.auth-modal-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 24px;
  position: relative;
}

.auth-tab-btn {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.25s;
}

.auth-tab-btn.active {
  color: #1c3146;
}

#auth-tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 24px;
  width: calc(50% - 24px);
  height: 2px;
  background: #041123;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  transform: translateX(0);
  opacity: 1;
}

#auth-tab-indicator[data-tab-index="1"] {
  transform: translateX(100%);
}

#auth-tab-indicator.is-hidden {
  opacity: 0;
}

#auth-slider-wrapper {
  overflow: hidden;
}

#auth-slider {
  display: flex;
  align-items: flex-start;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
}

#auth-slider[data-active-index="1"] {
  transform: translateX(-100%);
}

#auth-slider[data-active-index="2"] {
  transform: translateX(-200%);
}

.auth-tab-content {
  min-width: 100%;
  padding: 24px;
  box-sizing: border-box;
}

.auth-card-header {
  margin-bottom: 20px;
}

.auth-card-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-card-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.auth-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1c3146;
}

.auth-card-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.auth-error {
  display: none;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: 13px;
  color: #b91c1c;
}

.auth-error.is-visible {
  display: block;
}

.auth-success {
  display: none;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 13px;
  color: #166534;
}

.auth-success.is-visible {
  display: block;
}

.auth-form-field {
  margin-bottom: 16px;
}

.auth-form-field--last {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: #fff;
}

.auth-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
}

.auth-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  cursor: pointer;
}

.auth-link {
  color: #041123;
  text-decoration: none;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: #041123;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-privacy-note {
  margin-top: 16px;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
}

.auth-back-link-wrap {
  margin-top: 16px;
  text-align: center;
}

.auth-back-link {
  color: #041123;
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

img.auth-avatar-cover {
  object-fit: cover;
}
