/**
 * Premium Toggle Styles
 *
 * Glassmorphism effects and smooth animations for premium toggle components
 *
 * @package ProRank\Admin\Styles
 * @since   1.0.0
 */

/* Premium Toggle Container */
.prorank-premium-toggle {
  position: relative;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.prorank-premium-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.prorank-premium-toggle--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Toggle Content Layout */
.prorank-premium-toggle__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.prorank-premium-toggle__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.prorank-premium-toggle__right {
  display: flex;
  align-items: center;
}

/* Icon */
.prorank-premium-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.prorank-premium-toggle__icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

.prorank-premium-toggle:hover .prorank-premium-toggle__icon {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Text Content */
.prorank-premium-toggle__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.prorank-premium-toggle__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
  line-height: 1.4;
}

.prorank-premium-toggle__description {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* Tier Badge */
.prorank-premium-toggle__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  transition: all 150ms ease-in-out;
}

/* Toggle Switch */
.prorank-toggle-switch {
  position: relative;
  width: 48px;
  height: 24px;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.prorank-toggle-switch:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  border-radius: 12px;
}

.prorank-toggle-switch--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Toggle Track */
.prorank-toggle-switch__track {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.prorank-toggle-switch:hover .prorank-toggle-switch__track {
  background: rgba(255, 255, 255, 0.25);
}

.prorank-toggle-switch--enabled .prorank-toggle-switch__track {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 2px 4px 0 rgba(0, 0, 0, 0.1),
    0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Toggle Thumb */
.prorank-toggle-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 4px 0 rgba(0, 0, 0, 0.2),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.prorank-toggle-switch--enabled .prorank-toggle-switch__thumb {
  transform: translateX(24px);
}

/* Toggle Icon */
.prorank-toggle-switch__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.4);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.prorank-toggle-switch--enabled .prorank-toggle-switch__icon {
  color: #059669;
}

/* Loading State */
.prorank-toggle-switch .components-spinner {
  margin: 0;
  width: 24px;
  height: 24px;
}

/* Responsive Design */
@media (max-width: 640px) {
  .prorank-premium-toggle {
    padding: 0.875rem 1rem;
  }

  .prorank-premium-toggle__content {
    gap: 0.75rem;
  }

  .prorank-premium-toggle__left {
    gap: 0.625rem;
  }

  .prorank-premium-toggle__icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .prorank-premium-toggle__icon svg {
    width: 18px;
    height: 18px;
  }

  .prorank-premium-toggle__label {
    font-size: 0.875rem;
  }

  .prorank-premium-toggle__description {
    font-size: 0.75rem;
  }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  .prorank-premium-toggle {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .prorank-premium-toggle:hover {
    background: rgba(31, 41, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .prorank-premium-toggle__icon {
    background: rgba(255, 255, 255, 0.1);
  }

  .prorank-premium-toggle:hover .prorank-premium-toggle__icon {
    background: rgba(255, 255, 255, 0.15);
  }

  .prorank-toggle-switch__track {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .prorank-toggle-switch:hover .prorank-toggle-switch__track {
    background: rgba(55, 65, 81, 0.9);
  }
}

/* Animation Keyframes */
@keyframes toggle-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prorank-premium-toggle {
  animation: toggle-in 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
