/* =========================================================
   Elite Instagram Auth Theme — Light Theme Default
   ========================================================= */

.ig-auth {
  align-items: center;
  animation: igAuthGradient 12s ease infinite;
  background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
  background-size: 400% 400%;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

@keyframes igAuthGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Auth card ── */
.ig-auth-card {
  animation: igAuthCardEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: hsla(0, 0%, 100%, 0.97);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 420px;
  overflow: hidden;
  padding: 40px 32px 32px;
  position: relative;
  width: 100%;
}

.ig-auth-card::before {
  background: linear-gradient(90deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

@keyframes igAuthCardEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Brand ── */
.ig-auth-brand {
  margin-bottom: 32px;
  text-align: center;
}

.ig-auth-brand .brand-icon {
  align-items: center;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.3);
  color: #fff;
  display: flex;
  font-size: 24px;
  height: 56px;
  justify-content: center;
  margin: 0 auto 12px;
  width: 56px;
}

.ig-auth-brand h1 {
  color: #262626;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
}

.ig-auth-brand p {
  color: #8e8e8e;
  font-size: 14px;
  margin: 0;
}

/* ── Form fields (floating labels) ── */
.ig-auth-field {
  margin-bottom: 20px;
  position: relative;
}

.ig-auth-field input,
.ig-auth-field select,
.ig-auth-field textarea {
  background: #fafafa;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  box-sizing: border-box;
  color: #262626;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  padding: 18px 14px 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.ig-auth-field input:focus,
.ig-auth-field select:focus,
.ig-auth-field textarea:focus {
  background: #fff;
  border-color: #8900fa;
  box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.12);
}

.ig-auth-field input.is-invalid,
.ig-auth-field select.is-invalid,
.ig-auth-field textarea.is-invalid {
  border-color: #ed4956;
  box-shadow: 0 0 0 3px rgba(237, 73, 86, 0.12);
}

/* Floating label — hidden placeholder trick */
.ig-auth-field input::placeholder,
.ig-auth-field select::placeholder,
.ig-auth-field textarea::placeholder {
  color: transparent;
}

.ig-auth-field .ig-auth-label {
  color: #8e8e8e;
  font-size: 14px;
  left: 14px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: color 0.15s ease, transform 0.15s ease;
}

/* Float label on focus or when input has value */
.ig-auth-field input:focus + .ig-auth-label,
.ig-auth-field input:not(:placeholder-shown) + .ig-auth-label,
.ig-auth-field select:focus + .ig-auth-label,
.ig-auth-field select:not(:placeholder-shown) + .ig-auth-label,
.ig-auth-field textarea:focus + .ig-auth-label,
.ig-auth-field textarea:not(:placeholder-shown) + .ig-auth-label {
  color: #8900fa;
  transform: translateY(-10px) scale(0.82);
}

/* Blurred state floating label color */
.ig-auth-field input:not(:placeholder-shown):not(:focus) + .ig-auth-label,
.ig-auth-field select:not(:placeholder-shown):not(:focus) + .ig-auth-label,
.ig-auth-field textarea:not(:placeholder-shown):not(:focus) + .ig-auth-label {
  color: #8e8e8e;
}

.ig-auth-field .ig-auth-error {
  color: #ed4956;
  display: none;
  font-size: 11px;
  margin-top: 4px;
  padding-left: 4px;
}

.ig-auth-field.has-error .ig-auth-error {
  display: block;
}

/* ── Password toggle ── */
.ig-auth-toggle-pass {
  background: none;
  border: none;
  color: #8e8e8e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 4px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.ig-auth-toggle-pass:hover {
  color: #262626;
}

.ig-auth-toggle-pass:focus-visible {
  outline: 2px solid var(--ig-primary, #8900fa);
  outline-offset: 2px;
}

/* Make room for password toggle */
.ig-auth-field input[type="password"] {
  padding-right: 48px;
}

/* ── Button ── */
.ig-auth-btn {
  background: #8900fa;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  padding: 12px;
  position: relative;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  width: 100%;
}

.ig-auth-btn:hover {
  background: #1877f2;
  box-shadow: 0 4px 12px rgba(0, 149, 246, 0.35);
}

.ig-auth-btn:active {
  transform: scale(0.97);
}

.ig-auth-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ig-auth-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ig-auth-btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.ig-auth-btn.is-loading::after {
  animation: igAuthSpin 0.6s linear infinite;
  border: 2px solid hsla(0, 0%, 100%, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  height: 20px;
  left: 50%;
  margin: -10px 0 0 -10px;
  position: absolute;
  top: 50%;
  width: 20px;
}

@keyframes igAuthSpin {
  to { transform: rotate(360deg); }
}

/* ── Divider ── */
.ig-auth-divider {
  align-items: center;
  color: #8e8e8e;
  display: flex;
  font-size: 13px;
  margin: 24px 0;
}

.ig-auth-divider::before,
.ig-auth-divider::after {
  background: #dbdbdb;
  content: "";
  flex: 1;
  height: 1px;
}

.ig-auth-divider span {
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0 16px;
  text-transform: uppercase;
}

/* ── Social buttons ── */
.ig-auth-social {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ig-auth-social .social-btn {
  align-items: center;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 50%;
  color: #262626;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 44px;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  width: 44px;
}

.ig-auth-social .social-btn:hover {
  border-color: #8900fa;
  box-shadow: 0 2px 8px rgba(0, 149, 246, 0.15);
  color: #8900fa;
  transform: translateY(-2px);
}

.ig-auth-social .social-btn:focus-visible {
  outline: 2px solid var(--ig-primary, #8900fa);
  outline-offset: 2px;
}

/* ── Footer ── */
.ig-auth-footer {
  color: #8e8e8e;
  font-size: 13px;
  margin-top: 24px;
  text-align: center;
}

.ig-auth-footer a {
  color: #8900fa;
  font-weight: 600;
  text-decoration: none;
}

.ig-auth-footer a:hover {
  text-decoration: underline;
}

.ig-auth-footer a:focus-visible {
  outline: 2px solid var(--ig-primary, #8900fa);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Alerts ── */
.ig-auth-alert {
  align-items: center;
  animation: igAuthSlideDown 0.3s ease both;
  border-radius: 8px;
  display: flex;
  font-size: 13px;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 16px;
}

.ig-auth-alert.alert-success {
  background: #e8f8ef;
  border: 1px solid #b8edc9;
  color: #00a04a;
}

.ig-auth-alert.alert-danger {
  background: #fde8ea;
  border: 1px solid #f8c4c9;
  color: #cc1f2f;
}

.ig-auth-alert.alert-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #b8860b;
}

.ig-auth-alert.alert-info {
  background: #e3f2fd;
  border: 1px solid #b3d9f2;
  color: #0277bd;
}

@keyframes igAuthSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── reCAPTCHA ── */
.ig-auth-recaptcha {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 575.98px) {
  .ig-auth {
    align-items: flex-start;
    padding: 10vh 16px 16px;
  }

  .ig-auth-card {
    border-radius: 12px;
    padding: 28px 20px 24px;
  }

  .ig-auth-brand .brand-icon {
    font-size: 20px;
    height: 48px;
    width: 48px;
  }

  .ig-auth-brand h1 {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .ig-auth {
    padding: 6vh 12px 12px;
  }

  .ig-auth-card {
    border-radius: 10px;
    padding: 20px 16px;
  }

  .ig-auth-brand {
    margin-bottom: 20px;
  }

  .ig-auth-brand .brand-icon {
    font-size: 18px;
    height: 40px;
    margin-bottom: 8px;
    width: 40px;
  }

  .ig-auth-brand h1 {
    font-size: 18px;
  }

  .ig-auth-brand p {
    font-size: 12px;
  }

  .ig-auth-field {
    margin-bottom: 14px;
  }

  .ig-auth-field input,
  .ig-auth-field select,
  .ig-auth-field textarea {
    font-size: 13px;
    padding: 16px 12px 5px;
  }

  .ig-auth-field .ig-auth-label {
    font-size: 13px;
  }

  .ig-auth-btn {
    font-size: 14px;
    padding: 10px;
  }

  .ig-auth-footer {
    font-size: 12px;
    margin-top: 18px;
  }
}

/* ── Dark mode (opt-in) ── */
[data-theme="dark"] .ig-auth {
  background: linear-gradient(135deg, #1a1a2e, #16213e 50%, #0f3460);
}

[data-theme="dark"] .ig-auth-card {
  background: rgba(30, 30, 30, 0.97);
}

[data-theme="dark"] .ig-auth-card::before {
  background: linear-gradient(90deg, #e94560, #0f3460, #16213e, #1a1a2e);
}

[data-theme="dark"] .ig-auth-brand h1 {
  color: #f5f5f5;
}

[data-theme="dark"] .ig-auth-brand p {
  color: #a0a0a0;
}

[data-theme="dark"] .ig-auth-field input,
[data-theme="dark"] .ig-auth-field select,
[data-theme="dark"] .ig-auth-field textarea {
  background: #1e1e1e;
  border-color: #363636;
  color: #f5f5f5;
}

[data-theme="dark"] .ig-auth-field input:focus,
[data-theme="dark"] .ig-auth-field select:focus,
[data-theme="dark"] .ig-auth-field textarea:focus {
  background: #262626;
}

[data-theme="dark"] .ig-auth-field .ig-auth-label {
  color: #8e8e8e;
}

[data-theme="dark"] .ig-auth-btn {
  background: #e94560;
}

[data-theme="dark"] .ig-auth-btn:hover {
  background: #ff6b81;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
}

[data-theme="dark"] .ig-auth-divider::before,
[data-theme="dark"] .ig-auth-divider::after {
  background: #363636;
}

[data-theme="dark"] .ig-auth-social .social-btn {
  background: #1e1e1e;
  border-color: #363636;
  color: #f5f5f5;
}

[data-theme="dark"] .ig-auth-social .social-btn:hover {
  border-color: #e94560;
  color: #e94560;
}

[data-theme="dark"] .ig-auth-footer a {
  color: #e94560;
}

[data-theme="dark"] .ig-auth-alert.alert-success {
  background: #1a3a2a;
  border-color: #2a5a3a;
  color: #4cdf8b;
}

[data-theme="dark"] .ig-auth-alert.alert-danger {
  background: #3a1a1a;
  border-color: #5a2a2a;
  color: #ff6b6b;
}

[data-theme="dark"] .ig-auth-alert.alert-warning {
  background: #3a2a1a;
  border-color: #5a3a2a;
  color: #ffd54f;
}

[data-theme="dark"] .ig-auth-alert.alert-info {
  background: #1a2a3a;
  border-color: #2a3a5a;
  color: #64b5f6;
}

[data-theme="dark"] .ig-auth-toggle-pass {
  color: #a0a0a0;
}

[data-theme="dark"] .ig-auth-toggle-pass:hover {
  color: #f5f5f5;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ig-auth,
  .ig-auth-card,
  .ig-auth-btn,
  .ig-auth-btn.is-loading::after,
  .ig-auth-alert,
  .ig-auth-social .social-btn {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ig-auth-card {
    animation: none;
  }

  @keyframes igAuthGradient {
    0%, 50%, 100% { background-position: 0 50%; }
  }
}


/* =========================================================
   Vuexy Auth Override — Instagram-style
   ========================================================= */

/* Auth wrapper — full-screen gradient background */
.auth-wrapper.auth-cover {
  background: linear-gradient(135deg, #f5f0ff 0%, #e8f0fe 50%, #f0f5ff 100%) !important;
  min-height: 100vh;
}

[data-theme='dark'] .auth-wrapper.auth-cover {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%) !important;
}

.auth-wrapper.auth-cover .auth-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* Auth card area */
.auth-wrapper.auth-cover .auth-bg {
  background: var(--ig-surface) !important;
  border-radius: var(--ig-radius-lg) !important;
  box-shadow: var(--ig-shadow-lg) !important;
  display: flex;
  align-items: center;
}

[data-theme='dark'] .auth-wrapper.auth-cover .auth-bg {
  background: var(--ig-surface-dark) !important;
}

/* Auth brand logo */
.auth-wrapper.auth-cover .brand-logo {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
}

.auth-wrapper.auth-cover .brand-logo img {
  max-height: 36px;
}

/* Auth input fields */
.auth-wrapper.auth-cover .form-control {
  border-radius: var(--ig-radius-sm) !important;
  border: 1px solid var(--ig-border) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  background: var(--ig-surface) !important;
  transition: var(--ig-transition) !important;
}

.auth-wrapper.auth-cover .form-control:focus {
  border-color: var(--ig-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--ig-primary-rgb), 0.15) !important;
}

[data-theme='dark'] .auth-wrapper.auth-cover .form-control {
  background: var(--ig-surface-dark) !important;
  border-color: var(--ig-border-dark) !important;
  color: var(--ig-text-dark) !important;
}

/* Auth buttons */
.auth-wrapper.auth-cover .btn-primary {
  background: var(--ig-primary) !important;
  border: none !important;
  border-radius: var(--ig-radius-sm) !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  transition: var(--ig-transition) !important;
}

.auth-wrapper.auth-cover .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--ig-primary-rgb), 0.35);
}

/* Auth labels */
.auth-wrapper.auth-cover .form-label {
  font-weight: 500;
  color: var(--ig-text);
  margin-bottom: 6px;
}

[data-theme='dark'] .auth-wrapper.auth-cover .form-label {
  color: var(--ig-text-dark);
}

/* Auth titles */
.auth-wrapper.auth-cover h2.card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ig-text);
}

[data-theme='dark'] .auth-wrapper.auth-cover h2.card-title {
  color: var(--ig-text-dark);
}

/* Auth links */
.auth-wrapper.auth-cover a {
  color: var(--ig-primary);
  text-decoration: none;
}

.auth-wrapper.auth-cover a:hover {
  text-decoration: underline;
}

/* Auth illustration image */
.auth-wrapper.auth-cover .col-lg-8 img {
  max-height: 70vh;
  object-fit: contain;
}

@media (max-width: 991px) {
  .auth-wrapper.auth-cover .col-lg-8 {
    display: none !important;
  }
  .auth-wrapper.auth-cover .auth-bg {
    width: 100% !important;
    max-width: 420px;
    margin: 40px auto;
    border-radius: var(--ig-radius-lg) !important;
  }
}
