/* Home feed — sidebar widgets desktop only; mobile uses Discover → work-spotlight */

@media (max-width: 767px) {
  .feed-side-col {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .feed-card-widget {
    border-radius: 16px !important;
    border: 1px solid rgba(0, 174, 239, 0.1) !important;
    box-shadow: 0 2px 12px rgba(0, 174, 239, 0.06) !important;
    padding: 14px 16px !important;
    margin: 0 !important;
  }

  .widget-title {
    font-size: 13px !important;
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
  }

  /* Horizontal swipe for urgent castings */
  .widget-list--castings {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 10px !important;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .widget-list--castings::-webkit-scrollbar {
    display: none;
  }

  .widget-list--castings .feed-casting-card {
    flex: 0 0 82%;
    max-width: 300px;
    scroll-snap-align: start;
  }

  .widget-list--castings::after {
    content: '';
    flex: 0 0 8px;
  }

  .feed-casting-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid rgba(0, 174, 239, 0.1);
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    min-height: 0;
  }

  .feed-casting-card__thumb {
    width: 44px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #E2E8F0;
  }

  .feed-casting-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .feed-casting-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .feed-casting-card__title {
    font-size: 13px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .feed-casting-card__company {
    font-size: 11px;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .feed-casting-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
  }

  .feed-casting-card__urgent {
    font-size: 10px;
    font-weight: 700;
    color: #DC2626;
    background: #FEE2E2;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .feed-casting-card__match {
    font-size: 11px;
    font-weight: 700;
    color: #00AEEF;
    flex-shrink: 0;
  }

  .widget-list--castings-hint {
    font-size: 10px;
    color: #94A3B8;
    font-weight: 600;
    text-align: center;
    margin: 6px 0 0;
  }

  /* Compact leaderboard rows */
  .feed-leader-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
  }

  .feed-leader-row:last-of-type {
    border-bottom: none;
  }

  .feed-leader-row__rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
  }

  .feed-leader-row__rank--1 { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
  .feed-leader-row__rank--2 { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
  .feed-leader-row__rank--3 { background: #FFEDD5; color: #C2410C; border: 1px solid #FED7AA; }
  .feed-leader-row__rank--n { background: #F8FAFC; color: #94A3B8; font-weight: 700; }

  .feed-leader-row__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #F1F5F9;
    background: #E2E8F0;
  }

  .feed-leader-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .feed-leader-row__info {
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .feed-leader-row__name {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .feed-leader-row__city {
    font-size: 11px;
    color: #94A3B8;
  }

  .feed-leader-row__score {
    text-align: right;
    flex-shrink: 0;
  }

  .feed-leader-row__heat {
    font-size: 12px;
    font-weight: 800;
    color: #00AEEF;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
  }

  .feed-leader-row__change {
    font-size: 9px;
    font-weight: 700;
  }

  .feed-leader-row__change--up { color: #10B981; }
  .feed-leader-row__change--down { color: #DC2626; }
  .feed-leader-row__change--flat { color: #94A3B8; }

  .feed-leaderboard-cta {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #E8F7FD, #F0FAFF);
    border: 1px solid rgba(0, 174, 239, 0.2);
    border-radius: 12px;
    color: #0077A8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
  }

  .feed-widget-see-all {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #00AEEF;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
  }

  .widget-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid rgba(0, 174, 239, 0.05);
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  .widget-title-row .widget-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    flex: 1;
  }

  .feed-widget-highlight {
    outline: 2px solid rgba(0, 174, 239, 0.45);
    outline-offset: 2px;
    transition: outline-color 0.3s;
  }
}

/* Desktop: casting cards in vertical list */
@media (min-width: 768px) {
  .feed-casting-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid rgba(0, 174, 239, 0.08);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
  }

  .feed-casting-card:hover {
    background: #E8F7FD;
  }

  .feed-casting-card__thumb {
    width: 48px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #E2E8F0;
  }

  .feed-casting-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .feed-casting-card__body {
    flex: 1;
    min-width: 0;
  }

  .feed-casting-card__title {
    font-size: 13px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.35;
    margin: 0 0 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .feed-casting-card__company {
    font-size: 11px;
    color: #64748B;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .feed-casting-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .feed-casting-card__urgent {
    font-size: 10px;
    font-weight: 700;
    color: #DC2626;
    background: #FEE2E2;
    padding: 2px 6px;
    border-radius: 4px;
  }

  .feed-casting-card__match {
    font-size: 11px;
    font-weight: 700;
    color: #00AEEF;
  }

  .feed-leader-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    cursor: pointer;
  }

  .feed-leader-row:hover { opacity: 0.85; }

  .feed-leader-row__rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
  }

  .feed-leader-row__rank--1 { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
  .feed-leader-row__rank--2 { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
  .feed-leader-row__rank--3 { background: #FFEDD5; color: #C2410C; border: 1px solid #FED7AA; }
  .feed-leader-row__rank--n { background: #F8FAFC; color: #94A3B8; font-weight: 700; }

  .feed-leader-row__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #F1F5F9;
    background: #E2E8F0;
  }

  .feed-leader-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .feed-leader-row__info {
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .feed-leader-row__name {
    font-size: 12.5px;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .feed-leader-row__city {
    font-size: 10.5px;
    color: #94A3B8;
  }

  .feed-leader-row__score {
    text-align: right;
    flex-shrink: 0;
  }

  .feed-leader-row__heat {
    font-size: 12px;
    font-weight: 800;
    color: #00AEEF;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
  }

  .feed-leader-row__change {
    font-size: 9px;
    font-weight: 700;
  }

  .feed-leader-row__change--up { color: #10B981; }
  .feed-leader-row__change--down { color: #DC2626; }
  .feed-leader-row__change--flat { color: #94A3B8; }

  .widget-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid rgba(0, 174, 239, 0.05);
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  .widget-title-row .widget-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    flex: 1;
  }

  .feed-leaderboard-cta {
    margin-top: 8px;
    width: 100%;
    padding: 10px;
    background: #F8FAFC;
    border: 1px solid rgba(0, 174, 239, 0.08);
    border-radius: 10px;
    color: #00AEEF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'DM Sans', sans-serif;
  }

  .feed-leaderboard-cta:hover {
    background: #E8F7FD;
  }
}

/* ── Work Spotlight (Discover tab) ─────────────────────────────────────── */
.ws-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #F0F9FF 0%, #F8FAFC 40%, #F8FAFC 100%);
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  font-family: 'DM Sans', sans-serif;
}

.ws-appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #F1F5F9;
}

.ws-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #F1F5F9;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ws-appbar-text h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.3px;
}

.ws-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #00AEEF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.ws-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #F1F5F9;
}

.ws-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.ws-tab i { font-size: 16px; }

.ws-tab.active {
  background: #00AEEF;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 174, 239, 0.25);
}

.ws-tab em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  background: #DC2626;
  color: #fff;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ws-tab.active em {
  background: rgba(255, 255, 255, 0.95);
  color: #DC2626;
}

.ws-body {
  padding: 16px;
}

.ws-panel {
  display: none;
}

.ws-panel.active {
  display: block;
}

.ws-panel-desc {
  font-size: 13px;
  color: #64748B;
  margin: 0 0 14px;
  line-height: 1.45;
}

.ws-leader-list {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 174, 239, 0.08);
  padding: 4px 14px;
  box-shadow: 0 2px 12px rgba(0, 174, 239, 0.05);
}

.ws-cast-list--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-cast-list--stack .feed-casting-card {
  width: 100%;
  max-width: none;
  flex: none;
}

.ws-empty {
  text-align: center;
  font-size: 13px;
  color: #94A3B8;
  padding: 32px 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed #E2E8F0;
}

.ws-action-btn {
  width: 100%;
  margin-top: 16px;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.ws-action-btn--primary {
  background: #00AEEF;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 174, 239, 0.3);
}

.ws-footer-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.ws-footer-link {
  flex: 1;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.ws-footer-link i {
  font-size: 18px;
  color: #00AEEF;
}

.feed-leader-row--me {
  background: #F0F9FF;
  margin: 0 -14px;
  padding-left: 14px;
  padding-right: 14px;
  border-radius: 8px;
}

@media (min-width: 768px) {
  .ws-page {
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 40px;
  }

  .ws-back {
    display: none;
  }

  .ws-footer-actions {
    max-width: 640px;
    margin: 0 auto;
  }
}
