.overlay-card {
  background: var(--island-card);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid var(--island-border);
  padding: 10px 12px;
  box-shadow: var(--island-shadow);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 100%;
  overflow: hidden;
}

.overlay-card--clickable {
  cursor: pointer;
}

.overlay-card--clickable button,
.overlay-card--clickable input,
.overlay-card--clickable textarea,
.overlay-card--clickable select,
.overlay-card--clickable a {
  cursor: auto;
}

.overlay-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.overlay-card__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--island-subtle-hover);
  color: var(--island-text-secondary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.overlay-card__close:hover {
  background: var(--island-scrollbar);
  color: var(--island-text);
}

.overlay-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.overlay-card--permission .overlay-card__body {
  overflow: hidden;
}

/* Session context header */
.overlay-ctx {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.overlay-ctx__row1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--island-text-secondary);
}

.overlay-ctx__project,
.overlay-ctx__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-ctx__title {
  min-width: 0;
}

.overlay-ctx__sep {
  opacity: 0.4;
}

.overlay-ctx__agent {
  opacity: 0.7;
  flex-shrink: 0;
}

.overlay-ctx__row2 {
  display: flex;
  gap: 4px;
  font-size: 11px;
  color: var(--island-text-muted);
  overflow: hidden;
}

.overlay-ctx__you {
  flex-shrink: 0;
  font-weight: 500;
}

.overlay-ctx__msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Show all sessions footer */
.overlay-card__secondary {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-right: 12px;
  margin-left: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--island-brand-footer-border, color-mix(in srgb, var(--island-text) 10%, transparent));
}

.overlay-card__show-sessions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--island-brand-slogan, color-mix(in srgb, var(--island-text-secondary) 82%, var(--island-text) 18%));
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.overlay-card__brand-logo-stack {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.overlay-card__brand-logo {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  object-fit: contain;
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.overlay-card__brand-logo--light {
  filter: drop-shadow(0 1px 8px rgba(248, 164, 0, 0.16));
  opacity: var(--island-brand-logo-light-opacity, 1);
}

.overlay-card__brand-logo--dark {
  filter: drop-shadow(0 1px 8px rgba(255, 255, 255, 0.18));
  opacity: var(--island-brand-logo-dark-opacity, 0);
}

.overlay-card__show-sessions:hover {
  color: var(--island-text);
  transform: translateY(-1px);
}

.overlay-card__show-sessions--static {
  cursor: default;
}

.overlay-card__show-sessions--static:hover {
  color: var(--island-brand-slogan, color-mix(in srgb, var(--island-text-secondary) 82%, var(--island-text) 18%));
  transform: none;
}

.overlay-card__show-sessions span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
