/* Global Search UI Styling */
.global-search-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1000;
}

.search-bar-wrapper {
  position: relative;
  flex: 1;
  max-width: 910px;
  height: 44px;
}

.search-bar-wrapper .search-bar {
  max-width: 100% !important;
  margin: 0 !important;
}

.global-search-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: min(828px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  background: var(--white, #ffffff);
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: hidden;
  border: none;
  min-height: auto;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  color: var(--dark, #0F172A);
  container-type: inline-size;
}

.global-search-modal *,
.global-search-modal *::before,
.global-search-modal *::after {
  box-sizing: border-box;
  font-family: var(--gf-font);
}

.global-search-modal-header {
  display: flex;
  align-items: center;
  padding: 16px;
  min-height: 66px;
  border-bottom: none;
  gap: 16px;
  background: #FFFFFF !important;
}

.global-search-modal-header svg.search-icon {
  width: 22.8px;
  height: 22.8px;
  color: var(--gray-500, #64748B);
  flex-shrink: 0;
}

.global-search-modal-header input {
  flex: 1;
  border: none;
  background: #FFFFFF !important;
  outline: none;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  color: var(--dark, #0A0A0A);
  line-height: var(--gf-leading-body);
}

.global-search-modal-header input::placeholder {
  color: var(--gray-400, #98A2B3);
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
}

.global-search-modal-header .clear-btn {
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.global-search-modal-header .clear-btn:hover,
.global-search-modal-header .clear-btn:focus-visible {
  background: #F2F4F7;
  color: #101828;
  outline: none;
}

.global-search-tabs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px 16px;
  border-bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #FFFFFF;
}

.global-search-tabs-row::-webkit-scrollbar {
  display: none;
}

.global-search-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  box-sizing: border-box;
  gap: 8px;
  padding: 0 20px;
  background: #F2F4F7;
  border-radius: 999px;
  color: #101828;
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-medium);
  line-height: var(--gf-leading-body);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: max-content;
  transition: all 160ms cubic-bezier(0.2, 0, 0, 1);
}

.global-search-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.global-search-tab .tab-count {
  color: #94A3B8;
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  font-weight: var(--gf-weight-regular);
}

.global-search-tab.active {
  background: #E8F0FF;
  color: #2966F4;
}

.global-search-tab.active .tab-count {
  color: #6D9CF8;
}

.global-search-tab:hover,
.global-search-tab:focus-visible {
  background: #E8F0FF;
  outline: none;
}

.global-search-body {
  position: relative;
  padding: 16px;
  height: 420px;
  min-height: 420px;
  max-height: calc(100vh - 120px);
  flex: 0 0 auto;
  overflow-y: auto;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  background: #FFFFFF;
}

.global-search-state--error {
  position: absolute;
  inset: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100%;
  background: var(--white, #fff);
  color: var(--gray-500, #475467);
  text-align: center;
}

.global-search-state--error {
  flex-direction: column;
}

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

.global-search-body.has-no-results {
  overflow: hidden;
}

.global-search-body.has-no-results > [x-show]:not(.global-search-empty-state):not(.gf-empty-host):not(.global-search-loader):not(.global-search-state--error) {
  display: none !important;
}

.global-search-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #FFFFFF;
  color: #667085;
  font-size: var(--gf-text-body);
}

.global-search-loader {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 3px solid #DCE7FF;
  border-top-color: #2966F4;
  border-radius: 50%;
  animation: global-search-spin 700ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .global-search-loader {
    animation-duration: 1400ms;
  }
}

.global-search-state--error {
  flex-direction: column;
  gap: 12px;
  color: #b42318;
  text-align: center;
}

.global-search-retry {
  border: 1px solid #2966f4;
  border-radius: 6px;
  background: #fff;
  color: #2966f4;
  cursor: pointer;
  font: inherit;
  padding: 8px 14px;
}

.global-search-empty-state {
  width: 100%;
  height: 100%;
  min-height: 348px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.global-search-empty-state__art {
  width: 150px;
  height: 94px;
  flex: 0 0 auto;
  display: block;
}

.global-search-empty-state p {
  margin: 0;
  color: #344054;
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  line-height: var(--gf-leading-body);
}

.global-search-body::-webkit-scrollbar {
  width: 6px;
}

.global-search-body::-webkit-scrollbar-track {
  background: transparent;
}

.global-search-body::-webkit-scrollbar-thumb {
  background: #E2E8F0;
  /* gray-200 */
  border-radius: 10px;
}

.global-search-body::-webkit-scrollbar-thumb:hover {
  background: #CBD5E1;
  /* gray-300 */
}

.global-search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 14px;
  padding: 0 2px;
}

.global-search-results-count {
  color: #101828;
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  line-height: var(--gf-leading-body);
}

.global-search-filters {
  display: flex;
  gap: 28px;
  align-items: center;
}

.global-search-filter {
  background: none;
  border: none;
  color: #101828;
  font-size: var(--gf-text-body);
  cursor: pointer;
  font-weight: var(--gf-weight-medium);
  line-height: var(--gf-leading-body);
  padding: 0;
}

.global-search-filter.active {
  color: #2966F4;
}

.global-search-filter:hover,
.global-search-filter:focus-visible {
  color: #2966F4;
  outline: none;
}

.global-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
  width: 100%;
  box-sizing: border-box;
}

.global-search-card {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 18px;
  padding: 12px 14px;
  gap: 16px;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 88px;
  transition: background 160ms cubic-bezier(0.2, 0, 0, 1), box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
}

.global-search-card:hover {
  background: #F2F4F7;
}

/* Make it look like the gray active block shown in mockup for the first item */
.global-search-card.active-card {
  background: #F2F4F7;
}

.global-search-card:focus-within {
  background: #F2F4F7;
  box-shadow: 0 0 0 2px #B2CCFF;
}

.global-search-card-avatar {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search-card-avatar :is(img, svg).badge-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  fill: currentColor;
  z-index: 1;
}

.global-search-card-avatar svg.badge-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.global-search-card-avatar img.avatar-img {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  border: 0;
  transform: none;
}

.global-search-card-avatar-initials {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #E4E7EC;
  color: #344054;
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-semibold);
  line-height: 1;
}

.global-search-card-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.global-search-card-name {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  line-height: 1.25;
  color: #101828;
  margin-bottom: 2px;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.global-search-card-role {
  font-size: var(--gf-text-body);
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@container (max-width: 860px) {
  .global-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 600px) {
  .global-search-grid {
    grid-template-columns: 1fr;
  }
}

.global-search-card-actions {
  color: #667085;
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.global-search-card-actions:hover,
.global-search-card-actions:focus-visible {
  background: #E4E7EC;
  color: #344054;
  outline: none;
}

.global-search-footer {
  padding: 16px;
  text-align: center;
  border-top: 1px solid #F1F5F9;
  background: #FFFFFF;
}

.global-search-footer-link {
  color: var(--dark, #0A0A0A);
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-medium);
  text-decoration: none;
  display: inline-block;
}

.global-search-footer-link span {
  color: #2966F4;
}

/* Gated Search Blur & CTA Overlay */
.global-search-card.blurred,
.gf-event-card.blurred,
.global-search-deck-card.blurred,
.global-search-community-card.blurred,
.global-search-job-card.blurred,
.global-search-tutorial-card.blurred {
  filter: blur(5px) !important;
  -webkit-filter: blur(5px) !important;
  opacity: 0.55 !important;
  cursor: pointer !important;
  user-select: none !important;
}

.global-search-gated-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 20px 16px;
  margin-top: -65px;
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
  pointer-events: auto;
}

.homepage-search-modal .homepage-global-search-body {
  height: 420px;
  min-height: 420px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 14px 16px 16px;
}

.homepage-search-modal--guest .global-search-tabs-row {
  justify-content: stretch;
  gap: 12px;
}

.homepage-search-modal--guest .global-search-tab {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: 12px;
}

.homepage-search-modal .homepage-global-search-body.has-no-results > [x-show]:not(.gf-empty-host):not(.global-search-loader):not(.global-search-state--error) {
  display: none !important;
}

.homepage-search-modal .global-search-card-name {
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homepage-search-modal .global-search-gated-cta {
  position: sticky;
  bottom: -16px;
  margin: 12px -16px -16px;
  padding: 20px 16px 16px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 22%);
}

.homepage-search-modal .gf-event-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: var(--shell-panel-radius, 24px);
  background: #fff;
}

.homepage-search-modal .gf-event-card__media {
  position: relative;
  width: 120px;
  min-height: 120px;
  flex: 0 0 120px;
  overflow: hidden;
  background: #f2f4f7;
}

.homepage-search-modal .gf-event-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.homepage-search-modal .gf-event-card__image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2966f4;
  background: #f2f4f7;
}

.homepage-search-modal .gf-event-card__image-placeholder svg { width: 40px; height: 40px; }

.homepage-search-modal .gf-event-card__content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
}

.homepage-search-modal .gf-event-card__date,
.homepage-search-modal .gf-event-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: #667085;
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  white-space: nowrap;
}

.homepage-search-modal .gf-event-card__date svg { width: 16px; height: 16px; flex: 0 0 auto; }

.homepage-search-modal .gf-event-card__title {
  overflow: hidden;
  color: #0a0a0a;
  font-size: var(--gf-text-card);
  font-weight: var(--gf-weight-semibold);
  line-height: var(--gf-leading-card);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homepage-search-modal .gf-event-card__meta .gf-event-card__location {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homepage-search-modal .gf-event-card__dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #d0d5dd; }

@media (max-width: 540px) {
  .homepage-search-modal .gf-event-card__media { width: 88px; flex-basis: 88px; }
  .homepage-search-modal .gf-event-card__content { padding: 10px; }
}

.global-search-gated-text {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-medium);
  color: var(--dark, #0A0A0A);
  margin-bottom: 10px;
  text-align: center;
}

.global-search-gated-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.global-search-signup-btn {
  background: #2966F4;
  color: #FFFFFF !important;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-semibold);
  padding: 10px 28px;
  border-radius: 9999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: background 160ms cubic-bezier(0.2, 0, 0, 1), transform 160ms cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
  border: none;
}

.global-search-signup-btn:hover {
  background: #2054CC;
  transform: translateY(-1px);
}

.global-search-social-btn {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #D0D5DD;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 160ms cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.global-search-social-btn:hover {
  background: #F8FAFC;
  border-color: #98A2B3;
  transform: translateY(-1px);
}

.global-search-social-btn svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.homepage-search-modal .global-search-gated-actions > .global-search-social-btn {
  box-sizing: border-box;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  flex: 0 0 52px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

@media (max-width: 860px) {
  .global-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .search-bar-wrapper {
    max-width: 100%;
  }

  .global-search-grid {
    grid-template-columns: 1fr;
  }

  .global-search-filters {
    display: none;
    /* Hide on small screens or make scrollable */
  }
}

/* Search events use the same event card component as dashboard overviews. */
.global-search-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.global-search-event-grid .gf-event-card {
  min-width: 0;
  min-height: 120px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .global-search-event-grid {
    grid-template-columns: 1fr;
  }
}

/* Decks grid and cards */
.global-search-deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.global-search-deck-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.deck-card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 289 / 162;
  margin-top: 8px;
  margin-bottom: 4px;
}

.deck-card-img-wrapper::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 5.5%;
  right: 5.5%;
  height: 20px;
  background: #EEF1F5;
  border-radius: 16px 16px 0 0;
  z-index: 0;
}

.deck-card-img-wrapper::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 11%;
  right: 11%;
  height: 20px;
  background: #F2F4F7;
  border-radius: 16px 16px 0 0;
  z-index: -1;
}

.deck-card-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #EEF1F5;
  z-index: 1;
}

.deck-card-content-wrapper {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deck-card-title {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-medium);
  color: #0A0A0A;
  line-height: var(--gf-leading-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deck-card-verified {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  color: #2966F4;
}

.deck-card-verified svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 860px) {
  .global-search-deck-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Jobs grid and cards */
.global-search-job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.global-search-job-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--shell-panel-radius, 24px);
  cursor: pointer;
  min-width: 0;
  min-height: 218px;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 160ms cubic-bezier(0.2, 0, 0, 1);
  gap: 12px;
}

.global-search-job-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.global-search-job-card .job-card-poster {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  min-width: 0;
}

.global-search-job-card .job-card-poster .global-search-card-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.global-search-job-card .job-card-poster .global-search-card-avatar img.badge-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.global-search-job-card .job-card-poster .global-search-card-avatar img.avatar-img {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  transform: none;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.global-search-job-card .job-card-poster span {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body-strong);
  font-weight: var(--gf-weight-medium);
  line-height: var(--gf-leading-body);
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-job-card .job-card-title {
  font-family: var(--gf-font);
  font-size: var(--gf-text-title-card);
  font-weight: var(--gf-weight-semibold);
  color: #0F172A;
  line-height: var(--gf-leading-title-card);
  margin: 0;
  overflow-wrap: anywhere;
}

.global-search-job-card .job-card-desc {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body-strong);
  font-weight: var(--gf-weight-regular);
  color: #64748B;
  line-height: var(--gf-leading-body-strong);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.global-search-job-card .job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
  border: 0;
  border-top: 0;
  padding-top: 0;
}

.global-search-job-card .job-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--gf-text-body-strong);
  color: #64748B;
}

.global-search-job-card .job-card-location svg {
  width: 20px;
  height: 20px;
  color: #2966F4;
  flex-shrink: 0;
}

.global-search-job-card .job-card-price {
  font-family: var(--gf-font);
  font-size: var(--gf-text-title-card);
  font-weight: var(--gf-weight-semibold);
  line-height: var(--gf-leading-title-card);
  color: #0F172A;
}

/* Communities grid and cards */
.global-search-community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
.global-search-community-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #D0D5DD;
  border-radius: 24px;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 160ms cubic-bezier(0.2, 0, 0, 1), box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
}
.global-search-community-card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.community-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.community-card-name {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-medium);
  color: #0A0A0A;
  letter-spacing: -0.2px;
  line-height: var(--gf-leading-body);
}
.community-card-date {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  color: #667085;
  letter-spacing: -0.2px;
  line-height: var(--gf-leading-body);
}
.community-card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.community-card-member-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  z-index: 10;
  width: min(280px, calc(100vw - 48px));
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #D0D5DD;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16);
}
.community-card-member,
.community-card-member-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px;
  color: #344054;
  font-size: var(--gf-text-body);
}
.community-card-member img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}
.community-card-member-empty {
  color: #667085;
}
.community-avatar-stack {
  display: flex;
  align-items: center;
}
.community-avatar-stack img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  margin-left: -8px;
  position: relative;
  box-sizing: border-box;
}
.community-avatar-stack img:first-child {
  margin-left: 0;
}
.community-avatar-more {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2966F4;
  color: #FFFFFF;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-regular);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #FFFFFF;
  margin-left: -8px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}
.community-more-icon {
  width: 24px;
  height: 24px;
  color: #667085;
  cursor: pointer;
}

@media (max-width: 860px) {
  .global-search-job-grid,
  .global-search-community-grid {
    grid-template-columns: 1fr;
  }
}

/* Gamified Avatar for Jobs */
.gamified-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gamified-avatar-bg {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  clip-path: polygon(50% 0%, 61% 8%, 74% 4%, 79% 17%, 93% 21%, 91% 35%, 100% 45%, 93% 56%, 97% 70%, 84% 76%, 82% 90%, 68% 90%, 60% 100%, 50% 94%, 40% 100%, 32% 90%, 18% 90%, 16% 76%, 3% 70%, 7% 56%, 0% 45%, 9% 35%, 7% 21%, 21% 17%, 26% 4%, 39% 8%);
}
.gamified-avatar-bg.gold { background: linear-gradient(135deg, #FFFCA8, #FDB836, #F1DC83); }
.gamified-avatar-bg.blue { background: linear-gradient(135deg, #41B8FD, #0013BD, #6CC7FD); }
.gamified-avatar-bg.silver { background: linear-gradient(135deg, #C2E8FD, #919191, #DDDDDD); }

.gamified-avatar-ring {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
}

.gamified-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}


/* Stacking Context handling for Global Search Cards and Dropdowns */
.msg-row {
  position: relative !important;
  z-index: 1;
}

.msg-row:has(.global-search-card-actions-wrapper.is-dropdown-open) {
  position: relative !important;
  z-index: 160 !important;
}

.global-search-card-actions-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.global-search-menu-host {
  display: flex;
  align-items: center;
}

.global-search-menu-host .gf-menu__trigger {
  width: 36px;
  height: 36px;
}

.global-search-card-list-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 220;
  width: min(300px, calc(100vw - 32px));
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #D0D5DD;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16);
}

.global-search-card-list-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  color: #101828;
  font-size: var(--gf-text-body);
  font-weight: var(--gf-weight-semibold);
}

.global-search-card-list-popover-close {
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: var(--gf-text-body);
  line-height: 1;
  padding: 2px 6px;
}

.global-search-card-list-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #101828;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.global-search-card-list-popover-item:hover,
.global-search-card-list-popover-item:focus-visible {
  background: #F2F4F7;
  outline: none;
}

.global-search-modal .global-search-card-dropdown-item {
  font-size: var(--gf-text-body);
}

.global-search-modal .global-search-card-list-popover-header {
  font-size: var(--gf-text-body);
}

/* The people menu uses the shared list picker inside the result action host. */
.global-search-card-actions-wrapper > .global-search-card-list-popover {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(300px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  padding: 10px !important;
  border: 1px solid #D0D5DD !important;
  border-radius: 20px !important;
  background: #FFFFFF !important;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16) !important;
}

.global-search-card-actions-wrapper.is-dropdown-open {
  z-index: 170 !important;
}

.global-search-card-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
  border-radius: 28px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  z-index: 200;
  width: min(382px, calc(100vw - 32px));
  min-width: 280px;
  gap: 2px;
}

.global-search-card-dropdown-item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  color: #101828;
  cursor: pointer;
  border-radius: 14px;
  transition: background 160ms cubic-bezier(0.2, 0, 0, 1);
  text-align: left;
  line-height: 1;
}

.global-search-card-dropdown-item:hover {
  background: #F2F4F7;
}

.global-search-card-dropdown-item:focus-visible {
  background: #E8F0FF;
  outline: 2px solid #84ADFF;
  outline-offset: -2px;
}

.global-search-card-dropdown-item:focus-visible {
  outline: 2px solid var(--main, #2966F4);
  outline-offset: 2px;
}

.global-search-card-dropdown-item svg {
  width: 20px;
  height: 20px;
  color: #0A0A0A;
  stroke-width: 1.5;
  flex-shrink: 0;
}


.global-search-card-dropdown-item.delete-action {
  color: #EF4444;
}

.global-search-card-dropdown-item.delete-action svg {
  color: #EF4444;
}

.global-search-card-dropdown-item.delete-action:hover {
  background: #FEF2F2;
}

/* Flyout Popover Submenu Styles for Add to List */
.global-search-card-list-popover {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  left: auto !important;
  width: 210px !important;
  min-width: 190px !important;
  max-width: 220px !important;
  z-index: 300 !important;
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.14) !important;
  border-radius: 14px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
}

.global-search-card-list-popover .founders_dashboard_collaboration_list_menu_head {
  padding: 4px 4px 8px 4px !important;
  margin-bottom: 4px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.global-search-card-list-popover .founders_dashboard_collaboration_list_menu_head strong {
  font-size: var(--gf-text-control) !important;
  font-weight: var(--gf-weight-semibold) !important;
  color: #0F172A !important;
}

.global-search-card-list-popover .founders_dashboard_collaboration_list_menu_new {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: none !important;
  border: none !important;
  padding: 2px 4px !important;
  cursor: pointer !important;
  color: #2966F4 !important;
  font-size: var(--gf-text-control) !important;
  font-weight: var(--gf-weight-semibold) !important;
}

.global-search-card-list-popover .founders_dashboard_collaboration_list_menu_item {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  border: none !important;
  background: transparent !important;
  font-size: var(--gf-text-control) !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: background 160ms cubic-bezier(0.2, 0, 0, 1) !important;
}

.global-search-card-list-popover .founders_dashboard_collaboration_list_menu_item:hover {
  background: #F8FAFC !important;
  color: #2966F4 !important;
}

.global-search-card-list-popover .founders_dashboard_collaboration_list_menu_count {
  font-size: var(--gf-text-control) !important;
  font-weight: var(--gf-weight-semibold) !important;
  background: #F1F5F9 !important;
  color: #64748B !important;
  padding: 2px 6px !important;
  border-radius: 10px !important;
}

/* Inline List Submenu Styles */
.global-search-card-list-submenu {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 6px;
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #E2E8F0;
}

.global-search-card-list-submenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 4px 8px;
  font-size: var(--gf-text-control);
  font-weight: var(--gf-weight-semibold);
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.global-search-card-list-submenu-new {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #2966F4;
  font-size: var(--gf-text-control);
  font-weight: var(--gf-weight-semibold);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 160ms cubic-bezier(0.2, 0, 0, 1);
}

.global-search-card-list-submenu-new:hover {
  background: #DBEAFE;
  color: #2054CC;
}

.global-search-card-list-submenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: var(--gf-text-control);
  font-weight: var(--gf-weight-medium);
  color: #1E293B;
  cursor: pointer;
  transition: background 160ms cubic-bezier(0.2, 0, 0, 1);
  text-align: left;
}

.global-search-card-list-submenu-item:hover {
  background: #FFFFFF;
  color: #2966F4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.global-search-card-list-submenu-count {
  font-size: var(--gf-text-control);
  font-weight: var(--gf-weight-semibold);
  color: #64748B;
  background: #E2E8F0;
  padding: 1px 6px;
  border-radius: 10px;
}

.global-search-card-list-submenu-item:hover .global-search-card-list-submenu-count {
  background: #EFF6FF;
  color: #2966F4;
}

/* Tutorials grid and cards */
.global-search-tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.global-search-tutorial-card {
  display: flex;
  align-items: stretch;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--shell-panel-radius, 24px);
  padding: 12px;
  gap: 10px;
  min-height: 116px;
  height: auto;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 160ms cubic-bezier(0.2, 0, 0, 1);
}

.global-search-tutorial-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.global-search-tutorial-card .tutorial-card-thumb {
  position: relative;
  width: min(145px, 42%);
  height: auto;
  min-height: 0;
  align-self: stretch;
  aspect-ratio: auto;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  flex: 0 0 min(145px, 42%);
  box-sizing: border-box;
  background-color: #F1F5F9;
  overflow: hidden;
}

.global-search-tutorial-card .tutorial-card-image,
.global-search-tutorial-card .tutorial-card-image-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.global-search-tutorial-card .tutorial-card-image {
  display: block;
  object-fit: cover;
}

.global-search-tutorial-card .tutorial-card-image-placeholder {
  display: grid;
  place-items: center;
  color: #2966F4;
  background: #F2F4F7;
}

.global-search-tutorial-card .tutorial-card-image-placeholder svg {
  width: 40px;
  height: 40px;
}

.global-search-tutorial-card .tutorial-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.global-search-tutorial-card .tutorial-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.global-search-tutorial-card .tutorial-card-tutor {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.global-search-tutorial-card .global-search-card-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.global-search-tutorial-card .global-search-card-avatar :is(img, svg).badge-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.global-search-tutorial-card .global-search-card-avatar img.avatar-img {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  border: 0;
  background: transparent;
  box-shadow: none;
  z-index: 2;
  transform: translateY(-2px);
}

.global-search-tutorial-card .global-search-card-avatar-initials {
  width: 16px;
  height: 16px;
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
  transform: translateY(-2px);
}

.global-search-tutorial-card .tutor-name {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body-strong);
  font-weight: var(--gf-weight-medium);
  line-height: var(--gf-leading-caption);
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-tutorial-card .tutorial-more-btn {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-search-tutorial-card .tutorial-card-title {
  font-family: var(--gf-font);
  font-size: var(--gf-text-body-strong);
  font-weight: var(--gf-weight-semibold);
  color: #0F172A;
  line-height: var(--gf-leading-body-strong);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}

.global-search-tutorial-card .tutorial-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body-strong);
  color: #64748B;
  font-weight: var(--gf-weight-medium);
}

.global-search-tutorial-card .star-icon {
  width: 13px;
  height: 13px;
  color: #2966F4;
  fill: currentColor;
  flex-shrink: 0;
}

.global-search-tutorial-card .rating-num {
  color: #2966F4;
  font-weight: var(--gf-weight-semibold);
  font-size: var(--gf-text-body-strong);
}

.global-search-tutorial-card .rating-count {
  color: #64748B;
  font-size: var(--gf-text-body-strong);
}

@media (max-width: 860px) {
  .global-search-tutorial-grid {
    grid-template-columns: 1fr;
  }
}
