/**
 * LinkedIn Recommendations - Tiles and Detail Overlay
 * Matches glassmorphism, Avenir Next, dark/light mode from poi-content-panel
 */

/* Recommendation tiles (in Discover panel tray) */
.rec-tile {
  min-width: 12.5rem;
  width: 12.5rem;
  aspect-ratio: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface-color, #E4EBF1);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-radius: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

html.dark .rec-tile {
  background: var(--card-dark, #1c262d);
  border-color: rgba(255, 255, 255, 0.08);
}

.rec-tile:hover {
  background: var(--surface-hover, #e0e7ef);
  border-color: rgba(19, 146, 236, 0.3);
  box-shadow: 0 4px 20px rgba(19, 146, 236, 0.08);
}

html.dark .rec-tile:hover {
  background: rgba(28, 38, 45, 0.9);
  border-color: rgba(19, 146, 236, 0.4);
}

.rec-tile-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #03588C, #1392ec);
  flex-shrink: 0;
}

.rec-tile-avatar-wrap {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  position: relative;
}

.rec-tile-avatar-wrap > img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.rec-tile-name {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.3;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html.dark .rec-tile-name {
  color: #f1f5f9;
}

.rec-tile-role {
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.3;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html.dark .rec-tile-role {
  color: #94a3b8;
}

.rec-tile-read {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1392ec;
  margin-top: 0.25rem;
}

/* Recommendations detail overlay */
.recommendations-overlay-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 85vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.recommendations-overlay-panel::before {
  content: '"';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 6rem;
  font-family: Georgia, serif;
  color: rgba(19, 146, 236, 0.15);
  line-height: 1;
  pointer-events: none;
}

.recommendations-overlay-content {
  position: relative;
  padding: 2rem 2rem 2.5rem;
}

.recommendations-overlay-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
}

.recommendations-overlay-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #03588C, #1392ec);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.recommendations-overlay-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#rec-overlay-avatar img {
  width: 5rem;
  height: 5rem;
  display: block;
}

.recommendations-overlay-name {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.recommendations-overlay-role {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.recommendations-overlay-context {
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
}

.recommendations-overlay-translated {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.9);
  font-style: italic;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0;
}

.recommendations-overlay-body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(248, 250, 252, 0.9);
  white-space: pre-wrap;
}

.recommendations-overlay-body p {
  margin: 0 0 1rem;
}

.recommendations-overlay-body p:last-child {
  margin-bottom: 0;
}

.recommendations-overlay-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.recommendations-overlay-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Recommendation floating panel (movable, same as user profile panel) */
.rec-panel-body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rec-panel-translated {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rec-panel-body-p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 0.75rem;
}

@media (min-width: 768px) {
  .rec-floating-panel .rec-panel-body-p {
    font-size: 1.0625rem;
    line-height: 1.65;
  }
  .rec-floating-panel .rec-panel-translated {
    font-size: 0.75rem;
  }
  .rec-floating-panel .user-profile-name {
    font-size: 1.125rem;
  }
  .rec-floating-panel .text-xs {
    font-size: 0.8125rem;
  }
}

html.dark .rec-panel-body-p {
  color: rgba(248, 250, 252, 0.9);
}

.rec-panel-body-p:last-child {
  margin-bottom: 0;
}

.rec-panel-text .rec-panel-body-p:last-child {
  margin-bottom: 0;
}
