/**
 * ShootX Auth - Styles for login/signup forms
 *
 * Matches ShootXEvents theme: gradient boxes, Manrope font,
 * --main-color / --secondary-color CSS vars.
 *
 * @package ShootX_Auth
 */

/* ── Auth Box (shared by login & signup) ─────────────────────────── */

.shootx-auth-box {
  max-width: 420px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(50, 50, 50, 0.85) 0%, rgba(30, 30, 30, 0.92) 100%);
  color: #fff;
}

.shootx-auth-title {
  margin: 0 0 0.35rem;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.shootx-auth-lead {
  margin: 0 0 1.25rem;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

/* ── Toggle (Individual / Company) ───────────────────────────────── */

.shootx-auth-toggle {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.shootx-auth-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.shootx-auth-toggle label {
  padding: 10px 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.shootx-auth-toggle input[type="radio"]:checked + label {
  background: var(--main-color, #a855f7);
  color: #fff;
}

.shootx-auth-toggle label:hover {
  color: #fff;
}

/* ── Fields ──────────────────────────────────────────────────────── */

.shootx-auth-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.shootx-auth-field {
  display: flex;
  flex-direction: column;
}

.shootx-auth-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.shootx-auth-field input[type="text"],
.shootx-auth-field input[type="email"],
.shootx-auth-field input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shootx-auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.shootx-auth-field input:focus {
  outline: none;
  border-color: var(--main-color, #a855f7);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.shootx-auth-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
}

/* ── Company field (hidden by default) ───────────────────────────── */

.shootx-auth-field--company {
  display: none;
}

.shootx-auth-field--company.is-visible {
  display: flex;
}

/* ── Privacy checkbox ────────────────────────────────────────────── */

.shootx-auth-privacy {
  margin: 1rem 0 0.5rem;
}

.shootx-auth-privacy label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.shootx-auth-privacy input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--main-color, #a855f7);
}

.shootx-auth-privacy a {
  color: var(--main-color, #a855f7);
  text-decoration: none;
  font-weight: 500;
}

.shootx-auth-privacy a:hover {
  color: var(--secondary-color, #e9d5ff);
  text-decoration: underline;
}

/* ── Status messages ─────────────────────────────────────────────── */

.shootx-auth-status {
  display: none;
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.shootx-auth-status.is-visible {
  display: block;
}

.shootx-auth-status--success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.shootx-auth-status--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ── Submit button ───────────────────────────────────────────────── */

.shootx-auth-submit {
  margin-top: 1.25rem;
  position: relative;
}

.shootx-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--main-color, #a855f7) 0%, var(--secondary-color, #7c3aed) 100%);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.shootx-auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}

.shootx-auth-btn:active {
  transform: translateY(0);
}

.shootx-auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.shootx-auth-submit.is-loading .shootx-auth-btn {
  color: transparent;
}

.shootx-auth-submit.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: shootx-auth-spin 0.7s linear infinite;
}

@keyframes shootx-auth-spin {
  to { transform: rotate(360deg); }
}

/* ── Switch link (Already have account? / Don't have account?) ──── */

.shootx-auth-switch {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.shootx-auth-switch a {
  color: var(--main-color, #a855f7);
  text-decoration: none;
  font-weight: 500;
}

.shootx-auth-switch a:hover {
  color: var(--secondary-color, #e9d5ff);
  text-decoration: underline;
}

/* ── Logged-in box ───────────────────────────────────────────────── */

.shootx-auth-box--logged-in .shootx-auth-lead strong {
  color: var(--main-color, #a855f7);
}

/* ── Inline status (for [shootx_auth_status] shortcode) ──────────── */

.shootx-auth-inline-status {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.shootx-auth-inline-status a {
  color: var(--main-color, #a855f7);
  text-decoration: none;
  font-weight: 500;
}

.shootx-auth-inline-status a:hover {
  text-decoration: underline;
}

/* ── Header indicator (matches theme nav) ────────────────────────── */

/* Dedicated separator li: Contact … | Registration … */
nav#navigation ul.menu > li.shootx-nav-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

nav#navigation ul.menu > li.shootx-nav-separator .shootx-nav-sep {
  color: var(--header-text-color, #fff);
  opacity: 0.35;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.3em;
}

@media screen and (max-width: 990px) {
  nav#navigation ul.menu > li.shootx-nav-separator .shootx-nav-sep {
    font-size: 0.9em;
  }
}

/* Login link (after Registration) */
nav#navigation ul.menu > li.menu-item.shootx-login-menu-item a {
  color: var(--header-text-color, #fff);
  font-family: 'Manrope', inherit, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.3em;
  text-decoration: none;
  transition: opacity 0.3s, color 0.3s;
}

nav#navigation ul.menu > li.menu-item.shootx-login-menu-item a:hover,
nav#navigation ul.menu > li.menu-item.shootx-login-menu-item a:focus {
  opacity: 0.65;
}

@media screen and (max-width: 990px) {
  nav#navigation ul.menu > li.menu-item.shootx-login-menu-item a {
    font-size: 0.9em;
  }
}

/* Logged-in indicator (name + logout) — no leading pipe here */
nav#navigation ul.menu > li.menu-item.shootx-account-menu-item {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

nav#navigation ul.menu > li.menu-item.shootx-account-menu-item .shootx-name {
  color: var(--header-text-color, #fff);
  font-family: 'Manrope', inherit, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.3em;
  white-space: nowrap;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 990px) {
  nav#navigation ul.menu > li.menu-item.shootx-account-menu-item .shootx-name {
    font-size: 0.9em;
  }
}

nav#navigation ul.menu > li.menu-item.shootx-account-menu-item .shootx-logout {
  font-family: 'Manrope', inherit, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.3em;
  color: var(--header-text-color, #fff);
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.3s, color 0.3s;
}

@media screen and (max-width: 990px) {
  nav#navigation ul.menu > li.menu-item.shootx-account-menu-item .shootx-logout {
    font-size: 0.9em;
  }
}

nav#navigation ul.menu > li.menu-item.shootx-account-menu-item .shootx-logout:hover,
nav#navigation ul.menu > li.menu-item.shootx-account-menu-item .shootx-logout:focus {
  opacity: 0.65;
  color: var(--secondary-color);
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .shootx-auth-box {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .shootx-auth-toggle label {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .shootx-auth-btn {
    width: 100%;
  }
}
