/* PYMK Styles — v20260826a */
/* People You May Know component — dark glass-morphism with orange accents */

/* ========== Container & Rail ========== */
.pymk-rail {
  position: relative;
  margin: 0 0 16px 0;
  padding: 16px 0 12px;
  background: rgba(22, 22, 26, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.pymk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
}

.pymk-title {
  font-size: 15px;
  font-weight: 600;
  color: #e8e8ea;
  letter-spacing: -0.01em;
}

.pymk-nav {
  display: flex;
  gap: 6px;
}

.pymk-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #a0a0a6;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.pymk-nav-btn:hover:not(:disabled) {
  background: rgba(255, 107, 26, 0.1);
  border-color: rgba(255, 107, 26, 0.3);
  color: #ff6b1a;
}

.pymk-nav-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.pymk-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.pymk-nav-btn:focus-visible {
  outline: 2px solid #ff6b1a;
  outline-offset: 2px;
}

.pymk-nav-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ========== Scroll Track ========== */
.pymk-track {
  display: flex;
  gap: 10px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Hidden scrollbar */
.pymk-track::-webkit-scrollbar {
  display: none;
}

.pymk-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ========== Card ========== */
.pymk-card {
  flex: 0 0 152px;
  width: 152px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  position: relative;
  scroll-snap-align: start;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, opacity 0.4s;
  animation: pymk-card-enter 0.4s ease both;
}

.pymk-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Stagger animation */
.pymk-card:nth-child(1) { animation-delay: 0ms; }
.pymk-card:nth-child(2) { animation-delay: 50ms; }
.pymk-card:nth-child(3) { animation-delay: 100ms; }
.pymk-card:nth-child(4) { animation-delay: 150ms; }
.pymk-card:nth-child(5) { animation-delay: 200ms; }
.pymk-card:nth-child(6) { animation-delay: 250ms; }
.pymk-card:nth-child(7) { animation-delay: 300ms; }
.pymk-card:nth-child(8) { animation-delay: 350ms; }
.pymk-card:nth-child(9) { animation-delay: 400ms; }
.pymk-card:nth-child(10) { animation-delay: 450ms; }
.pymk-card:nth-child(n+11) { animation-delay: 500ms; }

@keyframes pymk-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card dismiss animation */
.pymk-card-dismiss {
  animation: pymk-card-dismiss 0.35s ease forwards;
}

@keyframes pymk-card-dismiss {
  to {
    opacity: 0;
    transform: scale(0.85) translateY(-8px);
    max-width: 0;
    padding: 0;
    margin: 0;
    border-width: 0;
    overflow: hidden;
  }
}

/* ========== Avatar ========== */
.pymk-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s;
}

.pymk-avatar-wrap:hover {
  transform: scale(1.05);
}

.pymk-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s;
}

.pymk-avatar-wrap:hover .pymk-avatar {
  border-color: rgba(255, 107, 26, 0.4);
}

.pymk-avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #ff6b1a 0%, #e85d0f 100%);
}

/* ========== Name & Username ========== */
.pymk-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e2e5;
  text-align: center;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.3;
  transition: color 0.2s;
}

.pymk-name:hover {
  color: #ff6b1a;
}

.pymk-username {
  font-size: 11.5px;
  color: #7a7a82;
  text-align: center;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  margin-top: 1px;
  line-height: 1.3;
  transition: color 0.2s;
}

.pymk-username:hover {
  color: #a0a0a6;
}

/* ========== Mutual Friends ========== */
.pymk-mutuals {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  min-height: 20px;
}

.pymk-mutual-avatars {
  display: flex;
}

.pymk-mutual-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(22, 22, 26, 0.9);
  object-fit: cover;
  margin-left: -5px;
}

.pymk-mutual-avatar:first-child {
  margin-left: 0;
}

.pymk-mutual-text {
  font-size: 11.5px;
  color: #7a7a82;
  white-space: nowrap;
}

/* ========== Action Button ========== */
.pymk-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 120px;
  height: 36px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #ff6b1a;
  background: transparent;
  color: #ff6b1a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
  position: relative;
}

.pymk-btn:hover {
  background: rgba(255, 107, 26, 0.12);
  color: #ff8040;
}

.pymk-btn:active {
  transform: scale(0.95);
}

.pymk-btn:focus-visible {
  outline: 2px solid #ff6b1a;
  outline-offset: 2px;
}

/* Button Loading State */
.pymk-btn-loading {
  pointer-events: none;
  border-color: rgba(255, 107, 26, 0.4);
  color: transparent;
}

.pymk-btn-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 107, 26, 0.3);
  border-top-color: #ff6b1a;
  border-radius: 50%;
  animation: pymk-spin 0.6s linear infinite;
}

@keyframes pymk-spin {
  to { transform: rotate(360deg); }
}

/* Button Sent State */
.pymk-btn-sent {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #7a7a82;
  pointer-events: none;
}

.pymk-btn-sent svg {
  width: 12px;
  height: 12px;
  stroke: #7a7a82;
}

/* ========== Dismiss Menu (3-dot) ========== */
.pymk-dismiss-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  margin: -11px -11px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #5a5a62;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.pymk-card:hover .pymk-dismiss-btn {
  opacity: 1;
}

.pymk-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #a0a0a6;
}

.pymk-dismiss-btn:focus-visible {
  opacity: 1;
  outline: 2px solid #ff6b1a;
  outline-offset: 1px;
}

.pymk-dismiss-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Dropdown */
.pymk-dismiss-menu {
  position: absolute;
  top: 30px;
  right: 4px;
  min-width: 130px;
  padding: 4px 0;
  background: rgba(30, 30, 34, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  transform: scale(0.92) translateY(-4px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}

.pymk-dismiss-menu.pymk-menu-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.pymk-dismiss-menu-item {
  display: block;
  width: 100%;
  padding: 12px 12px;
  border: none;
  background: none;
  color: #c8c8cc;
  font-size: 13px;
  min-height: 44px;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pymk-dismiss-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8ea;
}

.pymk-dismiss-menu-item--danger {
  color: #e84040;
}

.pymk-dismiss-menu-item--danger:hover {
  background: rgba(232, 64, 64, 0.08);
  color: #ff5252;
}

/* ========== Skeleton Loading ========== */
.pymk-skeleton-card {
  flex: 0 0 152px;
  width: 152px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.pymk-skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.pymk-skeleton-name {
  width: 80px;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 6px;
}

.pymk-skeleton-username {
  width: 60px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 10px;
}

.pymk-skeleton-mutuals {
  width: 70px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 12px;
}

.pymk-skeleton-btn {
  width: 90px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

/* Shimmer animation */
.pymk-shimmer {
  position: relative;
  overflow: hidden;
}

.pymk-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  animation: pymk-shimmer 1.5s infinite;
}

@keyframes pymk-shimmer {
  to { left: 100%; }
}

/* ========== Empty State ========== */
.pymk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.pymk-empty-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  color: #5a5a62;
}

.pymk-empty-text {
  font-size: 13px;
  color: #7a7a82;
}

/* ========== Error / Retry State ========== */
.pymk-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  text-align: center;
  gap: 10px;
}

.pymk-error-text {
  font-size: 13px;
  color: #7a7a82;
}

.pymk-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 26, 0.4);
  background: rgba(255, 107, 26, 0.08);
  color: #ff6b1a;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.pymk-retry-btn:hover {
  background: rgba(255, 107, 26, 0.15);
  border-color: rgba(255, 107, 26, 0.6);
}

.pymk-retry-btn:focus-visible {
  outline: 2px solid #ff6b1a;
  outline-offset: 2px;
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
  .pymk-rail {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0 -12px 12px;
    padding: 12px 0 10px;
  }

  .pymk-header {
    padding: 0 12px 10px;
  }

  .pymk-track {
    padding: 0 12px 4px;
    gap: 8px;
  }

  .pymk-card {
    flex: 0 0 140px;
    width: 140px;
    padding: 14px 8px 10px;
    min-height: 188px;
  }

  .pymk-nav {
    display: none;
  }
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  .pymk-card {
    animation: none;
  }

  .pymk-card-dismiss {
    animation-duration: 0.01ms;
  }

  .pymk-shimmer::after {
    animation: none;
  }

  .pymk-track {
    scroll-behavior: auto;
  }

  .pymk-btn-loading::after {
    animation-duration: 1.2s;
  }

  .pymk-dismiss-menu {
    transition: none;
  }

  .pymk-card,
  .pymk-btn,
  .pymk-avatar-wrap,
  .pymk-nav-btn {
    transition: none;
  }
}

/* ========== Focus Visible (Keyboard) ========== */
.pymk-avatar-wrap:focus-visible {
  outline: 2px solid #ff6b1a;
  outline-offset: 2px;
  border-radius: 50%;
}

.pymk-name:focus-visible,
.pymk-username:focus-visible {
  outline: 2px solid #ff6b1a;
  outline-offset: 1px;
  border-radius: 3px;
}

.pymk-dismiss-menu-item:focus-visible {
  outline: 2px solid #ff6b1a;
  outline-offset: -2px;
}

/* ========== Sidebar layout (desktop left panel) ========== */
#dlp-pymk-slot .pymk-rail {
  margin: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  padding: 12px;
}
#dlp-pymk-slot .pymk-header {
  padding: 0 0 8px;
}
#dlp-pymk-slot .pymk-title {
  font-size: 13px;
}
#dlp-pymk-slot .pymk-nav {
  display: none;
}
#dlp-pymk-slot .pymk-track {
  flex-direction: column;
  overflow-x: visible;
  overflow-y: auto;
  max-height: 440px;
  padding: 0;
  gap: 8px;
  scroll-snap-type: none;
}
#dlp-pymk-slot .pymk-card {
  flex: 0 0 auto;
  width: 100%;
  min-height: auto;
  padding: 10px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
#dlp-pymk-slot .pymk-avatar-wrap {
  width: 40px;
  height: 40px;
}
#dlp-pymk-slot .pymk-avatar,
#dlp-pymk-slot .pymk-avatar-fallback {
  width: 40px;
  height: 40px;
  font-size: 16px;
}
.pymk-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  min-width: 0;
}

#dlp-pymk-slot .pymk-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
#dlp-pymk-slot .pymk-name {
  font-size: 13px;
  text-align: left;
}
#dlp-pymk-slot .pymk-username {
  font-size: 11px;
  text-align: left;
}
#dlp-pymk-slot .pymk-mutuals {
  margin: 2px 0 0;
  justify-content: flex-start;
}
#dlp-pymk-slot .pymk-mutual-text {
  font-size: 10px;
}
#dlp-pymk-slot .pymk-btn {
  padding: 5px 12px;
  font-size: 11px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}
#dlp-pymk-slot .pymk-dismiss-btn {
  top: 6px;
  right: 4px;
}
