:root{ --accent:#3b82f6; --bg:#f6f8fb; --me:#e6f0ff; --other:#ffffff; }

body{
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial;
  background:var(--bg);
  margin:0;
  display:flex;
  height:100vh;
  align-items:center;
  justify-content:center;
}

.chat-wrap{
  width:960px;
  max-width:96%;
  height:640px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 8px 30px rgba(20,30,60,0.08);
  overflow:hidden;
  display:grid;
  grid-template-columns:320px 1fr;
}

.sidebar{
  display: flex;
  flex-direction: column;
  background:linear-gradient(180deg,#f8fafc,#ffffff);
  padding:18px;
  border-right:1px solid #edf2f7;
  height: 100%;   /* zawsze 100% wysokości chat-wrap */
  overflow-y: auto; /* przewijanie tylko jeśli dużo użytkowników */
}

.brand{
  font-weight:700;
  color:var(--accent);
  font-size:20px;
  margin-bottom:12px;
}

.room-info{ font-size:13px; color:#556; margin-bottom:16px; }

.users-list{
  max-height:480px;
  overflow:auto;
  padding-right:6px;
}

.user-item{
  padding:8px 6px;
  border-radius:8px;
  margin-bottom:6px;
  font-size:14px;
  background:#fff;
  box-shadow:0 1px 0 rgba(20,30,60,0.03);
}

.main{ display:flex; flex-direction:column; height:100%; overflow: hidden; }

.messages{
  flex:1 1 auto;
  padding:20px;
  overflow-y:auto;
  background:linear-gradient(180deg,#fbfdff,#f7fbff);
  min-height: 0;
}

.message{
  max-width:68%;
  padding:10px 12px;
  border-radius:12px;
  margin-bottom:10px;
  box-shadow:0 6px 14px rgba(15,25,40,0.04);
}

.meta{ font-size:12px; color:#6b7280; margin-bottom:6px; }

.me{ margin-left:auto; background:var(--me); text-align:right; border-bottom-right-radius:2px; }

.other{ margin-right:auto; background:var(--other); }

.footer{
  flex-shrink: 0;   /* nie zmniejsza się przy scrollu */
  padding: 12px;
  border-top: 1px solid #eef2f7;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;  /* tło, żeby było czytelne */
}

.input{ flex:1; display:flex; gap:8px; }

input[type="text"]{
  flex:1;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #e6eef8;
  font-size:14px;
}

button{
  background:var(--accent);
  color:#fff;
  border:0;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
}

.small{ font-size:12px; color:#6b7280; }

.overlay{
  position:fixed;
  inset:0;
  background:rgba(10,15,30,0.45);
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal{
  background:#fff;
  padding:22px;
  border-radius:10px;
  width:360px;
  box-shadow:0 20px 50px rgba(10,20,40,0.4);
}

.modal h2{ margin:0 0 8px 0; color:#111827; }

.timestamp{ font-size:11px; color:#9ca3af; margin-top:6px; }

.btn-wrap{ display:flex; gap:8px; margin-top:12px; }

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}


.emoji-picker {
  position: absolute;
  bottom: 50px; /* nad inputem */
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
}

.emoji-picker span {
  font-size: 20px;
  cursor: pointer;
  text-align: center;
}
.emoji-picker span:hover {
  background: #f3f4f6;
  border-radius: 6px;
}
