/**
 * Apple Sign-In Button Styles
 *
 * Styles for Apple Sign-In button following Apple's design guidelines
 *
 * @package PremierLineGym
 * @since 1.2.0
 */

/* Apple Sign-In Wrapper */
.plg-apple-signin-wrapper {
  margin: 20px 0;
  text-align: center;
}

/* Apple Sign-In Button */
.plg-apple-signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  /* Sizing */
  min-width: 200px;
  padding: 12px 24px;

  /* Colors - Apple White (para fundo escuro) */
  background-color: #ffffff;
  color: #000000;

  /* Typography */
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;

  /* Border */
  border: 1px solid #ffffff;
  border-radius: 8px;

  /* Effects */
  transition: all 0.2s ease-in-out;
  cursor: pointer;

  /* Remove default link styles */
  outline: none;
}

/* Hover State */
.plg-apple-signin-button:hover {
  background-color: #f5f5f7;
  border-color: #f5f5f7;
  color: #000000;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

/* Active/Pressed State */
.plg-apple-signin-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.3);
}

/* Focus State (for accessibility) */
.plg-apple-signin-button:focus {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

/* Apple Logo */
.plg-apple-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* Button Text */
.plg-apple-signin-text {
  white-space: nowrap;
  user-select: none;
}

/* White Button Variant (optional) */
.plg-apple-signin-button.plg-apple-signin-white {
  background-color: #ffffff;
  color: #000000;
  border-color: #d1d1d6;
}

.plg-apple-signin-button.plg-apple-signin-white:hover {
  background-color: #f5f5f7;
  border-color: #c7c7cc;
}

/* Loading State for Native App */
.plg-apple-signin-button.plg-apple-signin-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}

.plg-apple-signin-button.plg-apple-signin-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: plg-apple-spinner 0.8s linear infinite;
}

@keyframes plg-apple-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Notice Styles */
.plg-notice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
  border-left: 4px solid;
  background-color: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  line-height: 1.5;
  color: #ffffff;
}

/* Notice Icon */
.plg-notice-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plg-notice-icon::before {
  content: "ℹ";
  font-weight: bold;
  font-size: 14px;
}

/* Notice Text */
.plg-notice-text {
  flex: 1;
  color: #ffffff;
}

/* Dismiss Button */
.plg-notice-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.plg-notice-dismiss:hover {
  opacity: 1;
}

/* Notice Types */
.plg-notice-success {
  background-color: rgba(16, 185, 129, 0.15);
  border-left-color: #10b981;
  color: #6ee7b7;
}

.plg-notice-success .plg-notice-icon {
  background-color: #10b981;
  color: #ffffff;
}

.plg-notice-success .plg-notice-icon::before {
  content: "✓";
}

.plg-notice-success .plg-notice-text {
  color: #d1fae5;
}

.plg-notice-error {
  background-color: rgba(239, 68, 68, 0.15);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.plg-notice-error .plg-notice-icon {
  background-color: #ef4444;
  color: #ffffff;
}

.plg-notice-error .plg-notice-icon::before {
  content: "✕";
}

.plg-notice-error .plg-notice-text {
  color: #fee2e2;
}

.plg-notice-warning {
  background-color: rgba(245, 158, 11, 0.15);
  border-left-color: #f59e0b;
  color: #fcd34d;
}

.plg-notice-warning .plg-notice-icon {
  background-color: #f59e0b;
  color: #000000;
}

.plg-notice-warning .plg-notice-icon::before {
  content: "⚠";
}

.plg-notice-warning .plg-notice-text {
  color: #fef3c7;
}

.plg-notice-info {
  background-color: rgba(59, 130, 246, 0.15);
  border-left-color: #3b82f6;
  color: #93c5fd;
}

.plg-notice-info .plg-notice-icon {
  background-color: #3b82f6;
  color: #ffffff;
}

.plg-notice-info .plg-notice-text {
  color: #dbeafe;
}

/* Responsive */
@media (max-width: 768px) {
  .plg-apple-signin-button {
    width: 100%;
    max-width: 100%;
  }

  .plg-notice {
    margin: 15px 0;
    padding: 12px 16px;
  }
}

/* Integration with Elementor Form */
.elementor-form .plg-apple-signin-wrapper {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.elementor-form .plg-apple-signin-wrapper::before {
  content: "or";
  display: block;
  text-align: center;
  margin-bottom: 15px;
  color: #757575;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* PMS Login Form Integration */
#pms_login .plg-apple-signin-wrapper {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

/* ======================================
   Profile Incomplete Modal
   ====================================== */
.plg-profile-incomplete-modal .plg-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.plg-profile-modal-content {
  max-width: 380px;
  width: 88%;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
  animation: plgModalSlideIn 0.3s ease-out;
}

.plg-profile-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px 28px;
}

.plg-profile-modal-icon {
  margin-bottom: 16px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plg-profile-modal-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.plg-profile-modal-text {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.6;
  color: #cccccc;
}

.plg-profile-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  background: #fd8383;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.plg-profile-modal-btn:hover {
  background: #fc6b6b;
}

.plg-profile-modal-btn:active {
  transform: scale(0.98);
}

@keyframes plgModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 430px) {
  .plg-profile-modal-content {
    width: 92%;
  }

  .plg-profile-modal-body {
    padding: 28px 20px 20px;
  }
}
