/**
 * PRISM Tier Locked Styles
 *
 * Styles for locked features and upgrade modals.
 */

/* =========================================================================
 * LOCKED ELEMENTS
 * Elements that require a higher tier
 * ========================================================================= */

.tier-locked {
  position: relative;
  opacity: 0.6;
  cursor: not-allowed;
}

.tier-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: not-allowed;
}

.tier-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: var(--space-xs, 4px);
  color: var(--color-warning, #FFD700);
}

.tier-lock-icon svg {
  width: 14px;
  height: 14px;
}

/* Buttons that are locked */
button.tier-locked,
.btn.tier-locked {
  background: var(--color-text-muted, #888) !important;
  border-color: var(--color-text-muted, #888) !important;
  pointer-events: auto; /* Allow click to show modal */
}

/* =========================================================================
 * UPGRADE MODAL
 * Modal prompting user to upgrade
 * ========================================================================= */

.tier-upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 500);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tier-modal-in 200ms ease-out;
}

.tier-upgrade-modal.tier-upgrade-exit {
  animation: tier-modal-out 200ms ease-in forwards;
}

.tier-upgrade-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.tier-upgrade-content {
  position: relative;
  width: 90%;
  max-width: 420px;
  background: var(--color-card, #242424);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-xl, 0 12px 30px rgba(0, 0, 0, 0.3));
  overflow: hidden;
}

/* Header */
.tier-upgrade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg, 16px) var(--space-xl, 24px);
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
}

.tier-upgrade-header h2 {
  margin: 0;
  font-size: var(--text-lg, 18px);
  font-weight: var(--font-semibold, 600);
  color: var(--color-text, #e0e0e0);
}

.tier-upgrade-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 8px);
  color: var(--color-text-muted, #888);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.tier-upgrade-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text, #e0e0e0);
}

/* Body */
.tier-upgrade-body {
  padding: var(--space-xl, 24px);
  text-align: center;
}

.tier-upgrade-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg, 16px);
  background: rgba(0, 217, 255, 0.1);
  border-radius: 50%;
  color: var(--color-cyan, #00D9FF);
}

.tier-upgrade-icon svg {
  width: 32px;
  height: 32px;
}

.tier-upgrade-icon-warning {
  background: rgba(255, 215, 0, 0.1);
  color: var(--color-warning, #FFD700);
}

.tier-upgrade-message {
  margin: 0 0 var(--space-sm, 8px);
  font-size: var(--text-base, 14px);
  color: var(--color-text, #e0e0e0);
}

.tier-upgrade-cta {
  margin: 0;
  font-size: var(--text-sm, 12px);
  color: var(--color-text-muted, #888);
}

/* Footer */
.tier-upgrade-footer {
  display: flex;
  gap: var(--space-md, 12px);
  padding: var(--space-lg, 16px) var(--space-xl, 24px);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
}

.tier-upgrade-btn-secondary,
.tier-upgrade-btn-primary {
  flex: 1;
  padding: var(--space-md, 12px) var(--space-lg, 16px);
  border-radius: var(--radius-sm, 8px);
  font-size: var(--text-base, 14px);
  font-weight: var(--font-medium, 500);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.tier-upgrade-btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
  color: var(--color-text-muted, #888);
}

.tier-upgrade-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text, #e0e0e0);
}

.tier-upgrade-btn-primary {
  background: var(--color-cyan, #00D9FF);
  border: none;
  color: var(--color-black, #0A0A0A);
}

.tier-upgrade-btn-primary:hover {
  background: #00c4e6;
  transform: translateY(-1px);
}

/* =========================================================================
 * ANIMATIONS
 * ========================================================================= */

@keyframes tier-modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tier-modal-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Content slide-up animation */
.tier-upgrade-modal .tier-upgrade-content {
  animation: tier-content-in 300ms var(--transition-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.tier-upgrade-modal.tier-upgrade-exit .tier-upgrade-content {
  animation: tier-content-out 200ms ease-in forwards;
}

@keyframes tier-content-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tier-content-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

/* =========================================================================
 * REDUCED MOTION
 * ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  .tier-upgrade-modal,
  .tier-upgrade-modal .tier-upgrade-content {
    animation: none;
  }
}
