/**
 * Apple Sign-In Button Styles
 * Consistent styling for both modal and page login
 */

.apple-signin-container {
  margin: 1rem 0;
}

.social-login-divider {
  text-align: center;
  margin: 1.5rem 0 1rem 0;
  position: relative;
}

.social-login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
  z-index: 1;
}

.social-login-divider span {
  background: white;
  padding: 0 1rem;
  color: #666;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.apple-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #000;
  color: white;
  border: none;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  outline: none;
}

.apple-signin-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.apple-signin-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.apple-signin-btn:focus-visible {
  box-shadow:
    0 0 0 2px white,
    0 0 0 4px #007aff;
}

.apple-signin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.apple-signin-btn:disabled:hover {
  background: #000;
  transform: none;
  box-shadow: none;
}

.apple-signin-btn.loading {
  pointer-events: none;
}

.apple-logo {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .social-login-divider span {
    background: #1a1a1a;
    color: #ccc;
  }

  .social-login-divider::before {
    background: #444;
  }
}

/* Modal-specific styles */
.login-modal .apple-signin-container,
.modal-login .apple-signin-container {
  margin: 1rem 0;
}

/* PMPro login page styles */
.pmpro_login .apple-signin-container {
  margin: 1.5rem 0;
}

/* Responsive design */
@media (max-width: 480px) {
  .apple-signin-btn {
    font-size: 0.9rem;
    padding: 0.7rem 0.8rem;
  }

  .social-login-divider {
    margin: 1rem 0 0.8rem 0;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .apple-signin-btn {
    border: 2px solid white;
  }

  .apple-signin-btn:focus-visible {
    border: 2px solid #007aff;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .apple-signin-btn {
    transition: none;
  }

  .apple-signin-btn:hover {
    transform: none;
  }
}
