/* NH-Jobs v2.0 Modern Community UI (Bootstrap 5 overrides) */

:root{
  --wh-font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --wh-bg: #f6f7fb;
  --wh-surface: #ffffff;
  --wh-surface-2: #fbfbfe;
  --wh-text: #0b1220;
  --wh-muted: rgba(11,18,32,.62);
  --wh-border: rgba(11,18,32,.10);
  --wh-shadow: 0 10px 30px rgba(11,18,32,.08);
  --wh-shadow-sm: 0 8px 18px rgba(11,18,32,.06);
  --wh-radius: 12px;

  --wh-primary: #2563eb;
  --wh-primary-2: #1d4ed8;
  --wh-success: #16a34a;
  --wh-warning: #f97316;
  --wh-danger: #ef4444;
  --wh-tag-intern: #2563eb;
  --wh-tag-student: #f97316;
  --wh-chat-mine: #2563eb;
  --wh-chat-theirs: #eef2ff;
}

html, body{ height:100%; }
body{
  font-family: var(--wh-font) !important;
  background: var(--wh-bg);
  color: var(--wh-text);
}

/* Bootstrap overrides */
.card, .wh-card, .custom--card, .table-responsive{
  border-radius: var(--wh-radius) !important;
}
.card, .wh-card, .custom--card{
  border: 1px solid var(--wh-border) !important;
  box-shadow: var(--wh-shadow-sm);
}
.btn{
  border-radius: 999px;
}

/* Button icon spacing (works with Bootstrap icons / font-awesome / inline svg) */
.btn > i:first-child,
.btn > svg:first-child,
a.btn > i:first-child,
a.btn > svg:first-child{ margin-right: .5rem; }
.btn > i:last-child,
.btn > svg:last-child,
a.btn > i:last-child,
a.btn > svg:last-child{ margin-left: .5rem; }
.form-control, .form-select{
  border-radius: 12px;
  border-color: var(--wh-border) !important;
}
.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .25rem rgba(37,99,235,.15) !important;
}

/* Header tweaks */
.wh-header{ background: var(--wh-surface) !important; }
.wh-header .nav-link{ color: rgba(11,18,32,.78) !important; white-space: nowrap; }
.wh-header .nav-link:hover{ color: var(--wh-text) !important; }

/* App shell */
.wh-shell{
  display: flex;
  min-height: calc(100vh - 64px);
}

.wh-sidebar{
  width: 260px;
  background: var(--wh-surface);
  border-right: 1px solid var(--wh-border);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 18px;
}

.wh-sidebar .wh-side-title{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--wh-muted);
  text-transform: uppercase;
  margin: 14px 0 8px;
}

.wh-side-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(11,18,32,.78);
  text-decoration: none;
}
.wh-side-link:hover{ background: rgba(37,99,235,.08); color: var(--wh-text); }
.wh-side-link.active{ background: rgba(37,99,235,.12); color: var(--wh-primary-2); font-weight: 600; }
.wh-side-link i{ font-size: 18px; }

.wh-content{
  flex: 1;
  padding: 18px;
}

.wh-content .container{ max-width: 1100px; }

/* Mobile layout */
@media (max-width: 991.98px){
  .wh-shell{ display: block; }
  .wh-sidebar{ display:none; }
  .wh-content{ padding: 14px 12px 86px; }
}

/* Bottom nav */
.wh-bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 66px;
  background: var(--wh-surface);
  border-top: 1px solid var(--wh-border);
  box-shadow: 0 -10px 24px rgba(11,18,32,.06);
  display: none;
  z-index: 1040;
}
@media (max-width: 991.98px){
  .wh-bottom-nav{ display:flex; }
}
.wh-bottom-nav a{
  flex: 1;
  text-decoration: none;
  color: rgba(11,18,32,.70);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  font-size: 11px;
}
.wh-bottom-nav a i{ font-size: 20px; }
.wh-bottom-nav a.active{ color: var(--wh-primary); font-weight: 600; }

/* Feed */
.wh-feed-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 14px;
}
.wh-feed-title{ font-size: 20px; font-weight: 700; margin:0; }
.wh-feed-sub{ color: var(--wh-muted); margin:0; font-size: 13px; }

.wh-post{
  background: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius);
  box-shadow: var(--wh-shadow-sm);
  padding: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wh-post:hover{ transform: translateY(-4px); box-shadow: var(--wh-shadow); }

.wh-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}
.wh-tag--student{ background: var(--wh-tag-student); }
.wh-tag--intern{ background: var(--wh-tag-intern); }
.wh-tag--muted{ background: rgba(11,18,32,.10); color: rgba(11,18,32,.75); }

.wh-post .wh-post-title{ font-size: 16px; font-weight: 700; margin: 10px 0 4px; }
.wh-post .wh-post-meta{ color: var(--wh-muted); font-size: 13px; }
.wh-post .wh-post-body{ color: rgba(11,18,32,.80); font-size: 14px; margin-top: 10px; }

/* Chat */
.wh-chat-shell{
  display:flex;
  background: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius);
  overflow: hidden;
  box-shadow: var(--wh-shadow-sm);
  min-height: 70vh;
}

.wh-chat-list{
  width: 320px;
  border-right: 1px solid var(--wh-border);
  background: var(--wh-surface-2);
}

.wh-chat-list .wh-chat-list-head{
  padding: 14px;
  border-bottom: 1px solid var(--wh-border);
}

.wh-chat-list a{
  display:block;
  padding: 12px 14px;
  text-decoration:none;
  color: var(--wh-text);
  border-bottom: 1px solid rgba(11,18,32,.06);
}
.wh-chat-list a:hover{ background: rgba(37,99,235,.06); }
.wh-chat-list a.active{ background: rgba(37,99,235,.10); }

.wh-chat-pane{ flex:1; display:flex; flex-direction:column; }

.wh-chat-top{
  padding: 12px 14px;
  border-bottom: 1px solid var(--wh-border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: var(--wh-surface);
}

.wh-presence{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  color: var(--wh-muted);
  font-size: 12px;
}
.wh-dot{ width:10px; height:10px; border-radius:50%; background: rgba(11,18,32,.35); }
.wh-dot.online{ background: var(--wh-success); }

.wh-chat-body{
  flex: 1;
  padding: 14px;
  overflow:auto;
  background: linear-gradient(180deg, rgba(37,99,235,.05), rgba(255,255,255,0));
}

.wh-bubble-row{ display:flex; margin: 8px 0; align-items:flex-start; }
.wh-bubble-row.mine{ justify-content:flex-end; }
.wh-bubble-row.theirs{ justify-content:flex-start; }

.wh-bubble{
  max-width: min(560px, 88%);
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(11,18,32,.06);
  border: 1px solid rgba(11,18,32,.06);
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 14px;
  /* Avoid vertically stretched bubbles (e.g., when other CSS sets flex/height rules) */
  height:auto !important;
  min-height:unset !important;
  flex: 0 0 auto;
}
.wh-bubble.mine{ background: var(--wh-chat-mine); color: white; border-top-right-radius: 8px; }
.wh-bubble.theirs{ background: var(--wh-chat-theirs); color: var(--wh-text); border-top-left-radius: 8px; }

.wh-bubble-time{ margin-top: 6px; font-size: 11px; opacity: .75; }

.wh-chat-compose{
  padding: 12px 14px;
  border-top: 1px solid var(--wh-border);
  background: var(--wh-surface);
}

@media (max-width: 991.98px){
  .wh-chat-shell{ flex-direction: column; }
  .wh-chat-list{ width: 100%; }
}

.btn, .form-control, .form-select{ border-radius: 10px; }
.btn--base{ border-radius: 999px !important; }

a{ text-decoration: none; }
a:hover{ text-decoration: none; }

/* App shell */
.wh-shell{
  display: flex;
  min-height: calc(100vh - 72px);
}

.wh-sidebar{
  width: 264px;
  flex: 0 0 264px;
  background: var(--wh-surface);
  border-right: 1px solid var(--wh-border);
  box-shadow: 8px 0 22px rgba(11,18,32,.03);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.wh-sidebar .wh-side-head{
  padding: 14px 16px;
}

.wh-sidebar .wh-side-user{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wh-border);
}

.wh-side-user img{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--wh-border);
}

.wh-side-user .meta{ min-width: 0; }
.wh-side-user .meta .name{ font-weight: 700; font-size: 14px; }
.wh-side-user .meta .role{ font-size: 12px; color: var(--wh-muted); }

.wh-side-nav{
  padding: 10px;
}

.wh-side-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(11,18,32,.85);
  font-weight: 600;
  font-size: 13px;
}

.wh-side-nav a .count{
  margin-left:auto;
  background: rgba(37,99,235,.10);
  color: var(--wh-primary);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.wh-side-nav a:hover{ background: rgba(11,18,32,.04); }
.wh-side-nav a.active{ background: rgba(37,99,235,.10); color: var(--wh-primary); }

.wh-content{
  flex: 1 1 auto;
  min-width: 0;
}

.wh-content .wh-page{
  padding: 18px 0 28px;
}

/* Mobile bottom nav */
.wh-bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: var(--wh-surface);
  border-top: 1px solid var(--wh-border);
  box-shadow: 0 -12px 25px rgba(11,18,32,.05);
}
.wh-bottom-nav .inner{
  display:flex;
  justify-content: space-around;
  padding: 10px 8px;
}
.wh-bottom-nav a{
  color: rgba(11,18,32,.72);
  display:flex;
  flex-direction: column;
  align-items:center;
  gap:4px;
  font-size: 11px;
  font-weight: 600;
}
.wh-bottom-nav a.active{ color: var(--wh-primary); }
.wh-bottom-nav i{ font-size: 22px; line-height: 1; }

.wh-mobile-pad{ padding-bottom: 84px; }

@media (max-width: 991.98px){
  .wh-sidebar{ display:none; }
  .wh-shell{ display:block; min-height: auto; }
}

@media (min-width: 992px){
  .wh-bottom-nav{ display:none; }
  .wh-mobile-pad{ padding-bottom: 0; }
}

/* Feed */
.wh-feed-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wh-feed-title{ font-size: 20px; font-weight: 800; margin:0; }
.wh-feed-sub{ color: var(--wh-muted); font-size: 13px; margin: 0; }

.wh-feed-card{
  background: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius);
  box-shadow: var(--wh-shadow-sm);
  padding: 14px 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.wh-feed-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--wh-shadow);
}

.wh-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
}
.wh-tag--student{ background: rgba(249,115,22,.12); color: var(--wh-tag-student); }
.wh-tag--intern{ background: rgba(37,99,235,.12); color: var(--wh-tag-intern); }
.wh-tag--quick{ background: rgba(16,185,129,.12); color: #059669; }

.wh-meta-row{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--wh-muted);
  font-size: 12px;
}

/* Chat */
.wh-chat-shell{
  border: 1px solid var(--wh-border);
  background: var(--wh-surface);
  border-radius: var(--wh-radius);
  overflow: hidden;
  box-shadow: var(--wh-shadow-sm);
}

.wh-chat-cols{
  display:flex;
  min-height: 560px;
}

.wh-chat-left{
  width: 330px;
  border-right: 1px solid var(--wh-border);
  background: var(--wh-surface-2);
}

.wh-chat-right{ flex: 1 1 auto; min-width: 0; display:flex; flex-direction: column; }

@media (max-width: 991.98px){
  .wh-chat-cols{ display:block; }
  .wh-chat-left{ width: 100%; border-right:0; border-bottom: 1px solid var(--wh-border); }
}

.wh-chat-topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--wh-border);
  background: var(--wh-surface);
}

.wh-chat-peer{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.wh-presence{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(11,18,32,.25);
  box-shadow: 0 0 0 3px rgba(11,18,32,.06);
}
.wh-presence.online{
  background: var(--wh-success);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

.wh-chat-body{
  flex: 1 1 auto;
  padding: 12px 14px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(37,99,235,.03), rgba(37,99,235,0) 120px), #fff;
}

.wh-bubble-row{ display:flex; margin: 8px 0; align-items:flex-start; }
.wh-bubble-row.mine{ justify-content: flex-end; }
.wh-bubble-row.theirs{ justify-content: flex-start; }

.wh-bubble{
  max-width: min(560px, 88%);
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 6px 14px rgba(11,18,32,.06);
  height:auto !important;
  min-height:unset !important;
  flex: 0 0 auto;
}

.wh-bubble.mine{
  background: var(--wh-chat-mine);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.wh-bubble.theirs{
  background: var(--wh-chat-theirs);
  color: var(--wh-text);
  border-bottom-left-radius: 6px;
}

.wh-bubble .time{
  font-size: 11px;
  opacity: .75;
  margin-top: 6px;
}

.wh-chat-compose{
  padding: 12px 14px;
  border-top: 1px solid var(--wh-border);
  background: var(--wh-surface);
}

.wh-chat-compose .compose-row{
  display:flex;
  gap: 10px;
  align-items:center;
}

.wh-chat-compose .compose-row input[type='text']{
  border-radius: 999px;
  padding-left: 14px;
}

/* Utility */
.wh-muted{ color: var(--wh-muted) !important; }
.wh-surface{ background: var(--wh-surface) !important; }


/* === Chat bubble tight-height overrides (v3) === */
.wh-bubble{
  height:auto !important;
  min-height:unset !important;
  display:inline-flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:8px !important;
}
.wh-bubble-time{
  font-size:11px !important;
  opacity:.75 !important;
}
.wh-bubble img{
  display:block !important;
  max-width:100% !important;
  height:auto !important;
}
.wh-bubble .wh-attach-img{
  max-width:170px !important;
  max-height:130px !important;
  width:auto !important;
  height:auto !important;
}
