/* model-access.css — SET 6
 * Lock styling for session-creation pickers + popover for the upgrade
 * notice + flash highlight on plan cards when deep-linked from a popover.
 * Loaded after components.css so locked-card styles override the base
 * .model-card / .ms-option styles.
 */

/* ── Locked model card (session-creation picker) ─────────────────────── */
.model-card.locked,
.ms-option.locked {
  position: relative;
  opacity: 0.55;
  cursor: pointer; /* clickable to open popover, not disabled */
  transition: opacity 0.15s ease;
}
.model-card.locked:hover,
.ms-option.locked:hover {
  opacity: 0.75;
}

/* Lock badge — top-right corner */
.model-card-lock,
.ms-option-lock {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  pointer-events: none; /* let parent card receive clicks */
}
.model-card-lock svg,
.ms-option-lock svg {
  width: 12px;
  height: 12px;
  display: block;
}

/* ── Upgrade popover ─────────────────────────────────────────────────── */
.model-access-popover {
  position: absolute;
  z-index: 10000;
  min-width: 280px;
  max-width: 340px;
  padding: 14px 16px;
  background: #0f0f10;
  color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(217, 119, 87, 0.15);
  font-family: "DM Sans", -apple-system, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  /* Animation: subtle fade + slide-up */
  animation: macc-pop-in 0.14s ease-out;
}
@keyframes macc-pop-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.model-access-popover-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13.5px;
  color: #ffffff;
}
.model-access-popover-header svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--terra, #d97757);
}
.model-access-popover-header .macc-name {
  flex: 1;
}
.model-access-popover-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.model-access-popover-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
}

.model-access-popover-reason {
  color: #b8b8b8;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.model-access-popover-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--terra, #d97757);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s;
}
.model-access-popover-cta:hover {
  filter: brightness(1.08);
}
.model-access-popover-cta svg {
  width: 12px;
  height: 12px;
}

/* Pointer arrow on the popover (anchored side) */
.model-access-popover::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 22px;
  width: 12px;
  height: 12px;
  background: #0f0f10;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  transform: rotate(45deg);
}

/* ── Flash highlight on the destination plan card ────────────────────── */
.pricing-card.macc-flash {
  animation: macc-flash 1.6s ease-out 1;
  outline: 2px solid var(--terra, #d97757);
  outline-offset: 2px;
}
@keyframes macc-flash {
  0%   { outline-color: rgba(217, 119, 87, 1.0); box-shadow: 0 0 0 6px rgba(217, 119, 87, 0.30); }
  60%  { outline-color: rgba(217, 119, 87, 0.85); box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.15); }
  100% { outline-color: rgba(217, 119, 87, 0.0); box-shadow: 0 0 0 0 rgba(217, 119, 87, 0); }
}

/* ── Hidden state for filtered live-dropdown entries ─────────────────── */
.ms-option.access-hidden {
  display: none !important;
}
