/* ============================================
   GSAPify — Auth Styles
   Modal, social login buttons, user menu
   ============================================ */

/* ---- Auth Modal Overlay ---- */
.gs-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gs-auth-modal.open {
  opacity: 1;
  visibility: visible;
}

/* ---- Modal Card ---- */
.gs-auth-card {
  background: var(--gs-dark, #1A1A2E);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.gs-auth-modal.open .gs-auth-card {
  transform: translateY(0) scale(1);
}

/* ---- Close Button ---- */
.gs-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gs-auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---- Header ---- */
.gs-auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.gs-auth-header .gs-auth-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gs-primary, #00FF66);
  margin-bottom: 8px;
}
.gs-auth-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.gs-auth-header p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* ---- Social Login Buttons ---- */
.gs-auth-socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.gs-auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gs-auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.gs-auth-social-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Google colors */
.gs-auth-social-btn.gs-google:hover {
  border-color: rgba(66, 133, 244, 0.4);
}
/* Facebook colors */
.gs-auth-social-btn.gs-facebook:hover {
  border-color: rgba(24, 119, 242, 0.4);
}
/* Apple colors */
.gs-auth-social-btn.gs-apple:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

/* ---- Divider ---- */
.gs-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.gs-auth-divider::before,
.gs-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.gs-auth-divider span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---- Email Form ---- */
.gs-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.gs-auth-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}
.gs-auth-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.gs-auth-input:focus {
  border-color: var(--gs-primary, #00FF66);
}
.gs-auth-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--gs-primary, #00FF66);
  color: var(--gs-dark, #1A1A2E);
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gs-auth-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.gs-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---- Error Message ---- */
.gs-auth-error {
  display: none;
  padding: 10px 14px;
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.2);
  border-radius: 8px;
  color: #ff6b6b;
  font-size: 0.82rem;
  text-align: center;
  margin-bottom: 12px;
}

/* ---- Toggle Link ---- */
.gs-auth-toggle {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  cursor: pointer;
}
.gs-auth-toggle strong {
  color: var(--gs-primary, #00FF66);
}
.gs-auth-toggle:hover strong {
  text-decoration: underline;
}

/* ---- Nav: Sign-In Button ---- */
.gs-auth-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.gs-auth-signin-btn:hover {
  border-color: var(--gs-primary, #00FF66);
  color: var(--gs-primary, #00FF66);
}

/* ---- Nav: User Menu (Dropdown) ---- */
.gs-auth-user-menu {
  position: relative;
}
.gs-auth-user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.gs-auth-user-toggle:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.gs-auth-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.gs-auth-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-auth-user-chevron {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}

/* User Dropdown */
.gs-auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--gs-dark, #1A1A2E);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1100;
}
.gs-auth-user-menu.open .gs-auth-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.gs-auth-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 6px;
}
.gs-auth-dropdown-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.gs-auth-dropdown-email {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-auth-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.gs-auth-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.gs-auth-dropdown-item.gs-danger {
  color: #ff6b6b;
}
.gs-auth-dropdown-item.gs-danger:hover {
  background: rgba(255, 60, 60, 0.08);
}

/* Plan Badge */
.gs-auth-plan-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
  background: rgba(0, 255, 102, 0.1);
  color: var(--gs-primary, #00FF66);
}
.gs-auth-plan-badge.free {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Upgrade Modal — Plan Selection
   ============================================ */

.gs-upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gs-upgrade-modal.open {
  opacity: 1;
  visibility: visible;
}

.gs-upgrade-card {
  background: var(--gs-dark, #1A1A2E);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 640px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}
.gs-upgrade-modal.open .gs-upgrade-card {
  transform: translateY(0) scale(1);
}

.gs-upgrade-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gs-upgrade-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.gs-upgrade-header {
  text-align: center;
  margin-bottom: 28px;
}
.gs-upgrade-header .gs-upgrade-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(0, 255, 102, 0.1);
  margin-bottom: 16px;
}
.gs-upgrade-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.gs-upgrade-header p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Plan Toggle */
.gs-upgrade-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.gs-upgrade-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}
.gs-upgrade-toggle-label.active {
  color: #fff;
}
.gs-upgrade-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
  padding: 0;
}
.gs-upgrade-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--gs-primary, #00FF66);
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.gs-upgrade-toggle-switch.yearly::after {
  transform: translateX(20px);
}
.gs-upgrade-save {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gs-primary, #00FF66);
  background: rgba(0, 255, 102, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Plan Cards Grid */
.gs-upgrade-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.gs-upgrade-plan {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.gs-upgrade-plan:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
.gs-upgrade-plan.featured {
  border-color: rgba(0, 255, 102, 0.3);
  background: rgba(0, 255, 102, 0.04);
}
.gs-upgrade-plan.featured:hover {
  border-color: rgba(0, 255, 102, 0.5);
}

.gs-upgrade-plan-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--gs-primary, #00FF66);
  color: var(--gs-dark, #1A1A2E);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 6px;
}

.gs-upgrade-plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.gs-upgrade-plan-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 2px;
}
.gs-upgrade-plan-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}
.gs-upgrade-plan-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}

.gs-upgrade-plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gs-upgrade-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}
.gs-upgrade-plan-features li svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.gs-upgrade-plan-cta {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}
.gs-upgrade-plan-cta.primary {
  background: var(--gs-primary, #00FF66);
  color: var(--gs-dark, #1A1A2E);
}
.gs-upgrade-plan-cta.primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.gs-upgrade-plan-cta.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.gs-upgrade-plan-cta.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.gs-upgrade-plan-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gs-upgrade-footer {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
}
.gs-upgrade-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}
.gs-upgrade-footer a:hover {
  color: var(--gs-primary, #00FF66);
}

/* ---- Mobile Responsive ---- */
@media (max-width: 767px) {
  .gs-upgrade-card {
    margin: 12px;
    padding: 28px 18px 24px;
    max-width: none;
  }
  .gs-upgrade-plans {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .gs-upgrade-plan {
    padding: 20px 16px;
  }
  .gs-upgrade-plan-price {
    font-size: 1.5rem;
  }
  .gs-upgrade-header h3 {
    font-size: 1.15rem;
  }
}

@media (max-width: 991px) {
  .gs-auth-card {
    margin: 16px;
    padding: 28px 24px;
  }
  .gs-auth-user-name {
    display: none;
  }
  .gs-auth-user-chevron {
    display: none;
  }
  .gs-auth-user-toggle {
    padding: 4px;
  }
}
