/* style.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-family: Verdana, Arial, sans-serif;
}

body {
  background: #edf4ef;
  color: #222;
}

/* TOPO */

.top-header {
  background: #2458d3;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 20px;

  color: white;
}

.logo {
  height: 65px;
}

.search-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-area input {
  width: 220px;
  height: 30px;

  border: 1px solid #888;
  padding: 5px;
}

.search-area button {
  background: #ff9d2f;
  border: none;

  padding: 7px 14px;

  color: white;
  font-weight: bold;

  cursor: pointer;
}

.header-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* MENU */

.navbar {
  background: #ffffff;

  border-bottom: 3px solid #70b67c;

  display: flex;
  gap: 18px;
  flex-wrap: wrap;

  padding: 12px 18px;
}

.navbar a {
  text-decoration: none;

  color: #2c5e45;
  font-weight: bold;
}

/* LAYOUT */

.main-layout {
  width: 95%;
  margin: 20px auto;

  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* BANNER */

.welcome-banner {
  background: linear-gradient(to right, #83d0ae, #7fc5ff);

  padding: 25px;

  border-radius: 12px;

  color: white;

  margin-bottom: 20px;
}

.welcome-banner h1 {
  font-size: 40px;
  margin-bottom: 10px;
}

.welcome-banner p {
  font-size: 18px;
}

/* BOXES */

.box,
.login-panel,
.side-box {
  background: white;

  border: 1px solid #c9d7cb;

  margin-bottom: 20px;
}

.box-title {
  padding: 12px;

  font-size: 22px;
  font-weight: bold;

  color: white;
  background-color: #57b36d
}

.green {
  background: #57b36d;
}

.orange {
  background: #ff9d2f;
}

.purple {
  background: #8666d6;
}

.blue {
  background: #2458d3;
}

/* USERS */

.new-users {
  display: flex;
  justify-content: space-around;

  padding: 20px;
}

.user {
  text-align: center;
}

.avatar {
  width: 90px;
  height: 90px;

  background: linear-gradient(to bottom, #d9d9d9, #bfbfbf);

  border-radius: 10px;

  margin-bottom: 10px;
}

/* POSTS */

.post {
  padding: 20px;

  border-top: 1px solid #ddd;
}

.post h3 {
  margin-bottom: 10px;

  color: #2b5fb5;
}

.post a {
  text-decoration: none;

  color: #ff7e00;
  font-weight: bold;
}

/* COMUNIDADES */

.community-list {
  padding: 15px;
}

.community {
  background: #f3f8f4;

  border: 1px solid #d4e5d8;

  padding: 12px;

  margin-bottom: 10px;
}

/* LOGIN */

.login-top {
  background: #28e986;

  color: white;

  text-align: center;

  padding: 20px;
}

.login-logo {
  width: 180px;

  margin-bottom: 10px;
}

.login-box {
  padding: 20px;
}

.login-box h2 {
  text-align: center;

  color: #2458d3;

  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;

  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  height: 32px;

  border: 1px solid #999;

  padding: 5px;
}

.remember {
  margin-bottom: 15px;
}

.login-button,
.register-button {
  width: 100%;

  border: none;

  padding: 10px;

  color: white;
  font-weight: bold;

  cursor: pointer;

  margin-bottom: 10px;
}

.login-button {
  background: #57b36d;
}

.register-button {
  background: #ff9d2f;
}

.forgot {
  display: block;

  text-align: right;

  text-decoration: none;

  color: #2b5fb5;
}

/* SIDE */

.side-box {
  padding: 20px;
}

.side-box h3 {
  color: #2458d3;

  margin-bottom: 10px;
}

/* FOOTER */

footer {
  width: 95%;

  margin: auto auto 20px auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.footer-card {
  background: #d8eadf;

  border: 1px solid #bad1c2;

  text-align: center;

  padding: 15px;

  font-weight: bold;

  color: #2c5e45;
}

/* RESPONSIVO */

@media (max-width: 900px) {

  .main-layout {
    grid-template-columns: 1fr;
  }

  .top-header {
    flex-direction: column;
    gap: 15px;
  }

  .new-users {
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

}

/* ==========================================
   CHAT
========================================== */

.window {

  display: grid;
  grid-template-columns: 280px 1fr;

  width: 95%;
  height: calc(100vh - 180px);

  margin: 20px auto;

  background: white;

  border: 1px solid #c9d7cb;

}

/* ==========================================
   SIDEBAR
========================================== */

.chat-sidebar {

  display: flex;
  flex-direction: column;

  border-right: 1px solid #c9d7cb;

  background: #f7faf8;

}

.sidebar-header {

  text-align: center;

  padding: 15px;

  border-bottom: 1px solid #c9d7cb;

}

.sidebar-logo {

  width: 80px;

  margin-bottom: 10px;

}

.sidebar-header h2 {

  color: #2458d3;

}

.sidebar-actions {

  padding: 10px;

}

.sidebar-actions button {

  width: 100%;

}

.friends-title {

  padding: 10px;

  background: #57b36d;

  color: white;

  font-weight: bold;

}

/* ==========================================
   LISTA DE AMIGOS
========================================== */

.friends-list {

  flex: 1;

  overflow-y: auto;

}

.friend {

  display: flex;

  align-items: center;

  gap: 10px;

  padding: 10px;

  border-bottom: 1px solid #dce6de;

  cursor: pointer;

  transition: background .15s;

}

.friend:hover {

  background: #eef7f1;

}

.friend img {

  width: 48px;
  height: 48px;

  border-radius: 8px;

  border: 1px solid #c9d7cb;

}

.friend strong {

  color: #2458d3;

}

.friend span {

  color: #666;

  font-size: 12px;

}

/* ==========================================
   VIBRA MESSENGER
========================================== */

.chat-header {

  display: flex;

  align-items: center;

  padding: 15px;

  border-bottom: 1px solid #d8e5da;

  background: linear-gradient(to bottom,#ffffff,#eef6f1);

}

.chat-user {

  display: flex;

  align-items: center;

  gap: 15px;

}

.chat-user img {

  width: 64px;
  height: 64px;

  border-radius: 10px;

  border: 1px solid #c9d7cb;

  background: white;

}

.chat-user h2 {

  color: #2458d3;

  margin-bottom: 4px;

}

.chat-user span {

  color: #666;

  font-size: 13px;

}

/* ==========================================
   CONVERSA
========================================== */

.messages {

  height: 520px;

  overflow-y: auto;

  padding: 15px;

  background: #f8fbf9;

}

.empty-chat {

  margin-top: 120px;

  text-align: center;

  color: #666;

}

/* ==========================================
   MENSAGEM
========================================== */

.message {

  margin-bottom: 14px;

  background: white;

  border: 1px solid #d7e3d9;

}

.message-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 8px 12px;

  background: #edf5ef;

  border-bottom: 1px solid #d7e3d9;

}

.me .message-header {

  background: #e7f6ea;

}

.message-author {

  font-weight: bold;

  color: #2458d3;

}

.me .message-author {

  color: #57b36d;

}

.message-time {

  font-size: 12px;

  color: #777;

}

.message-body {

  padding: 12px;

}

.message-text {

  white-space: pre-wrap;

  word-break: break-word;

  line-height: 1.5;

}

/* ==========================================
   RODAPÉ
========================================== */

.chat-footer {

  display: flex;

  gap: 10px;

  padding: 15px;

  border-top: 1px solid #d8e5da;

  background: #f7fbf8;

}

.chat-footer input {

  flex: 1;

  height: 34px;

  padding: 0 10px;

  border: 1px solid #999;

  font-size: 14px;

}

.chat-footer input:disabled {

  background: #efefef;

}

.chat-footer button {

  width: 110px;

  border: none;

  background: #57b36d;

  color: white;

  font-weight: bold;

  cursor: pointer;

}

.chat-footer button:hover {

  background: #4ca562;

}

.chat-footer button:disabled {

  background: #9fc8a8;

  cursor: default;

}

/* ==========================================
   AMIGOS
========================================== */

.friends-list {

  max-height: 620px;

  overflow-y: auto;

}

.friend {

  display: flex;

  align-items: center;

  gap: 12px;

  padding: 12px;

  border-bottom: 1px solid #e5ece6;

  cursor: pointer;

  transition: .15s;

}

.friend:hover {

  background: #eef7f1;

}

.friend.active {

  background: #dfeefc;

}

.friend img {

  width: 52px;
  height: 52px;

  border-radius: 10px;

  border: 1px solid #c9d7cb;

  background: white;

}

.friend-info {

  flex: 1;

}

.friend strong {

  display: block;

  color: #2458d3;

  margin-bottom: 3px;

}

.friend span {

  color: #666;

  font-size: 12px;

}

/* ==========================================
   RESPONSIVO
========================================== */

@media (max-width:900px){

  .messages{

    height:400px;

  }

  .friends-list{

    max-height:250px;

  }

}

/* ==========================================
   PERFIL
========================================== */

.profile-header{

  display:flex;

  align-items:flex-start;

  gap:20px;

  padding:20px;

}

.profile-avatar{

  width:72px;
  height:72px;

  flex-shrink:0;

  border:1px solid #c9d7cb;

  border-radius:10px;

  background:white;

}

.profile-header h2{

  color:#2458d3;

  margin-bottom:8px;

}

.profile-header p{

  margin-bottom:6px;

  line-height:1.45;

}

#profileAbout,
#userAbout{

  margin-top:8px;

  padding:10px;

  background:#f7faf8;

  border:1px solid #d8e5da;

  border-radius:6px;

  white-space:pre-wrap;

  word-break:break-word;

  line-height:1.5;

}

/* ==========================================
   EDITAR PERFIL
========================================== */

.settings-area{

  padding:20px;

}

.settings-area label{

  display:block;

  margin-top:14px;
  margin-bottom:6px;

  font-weight:bold;

  color:#2458d3;

}

.settings-area input,
.settings-area textarea{

  width:100%;

  border:1px solid #999;

  padding:8px;

  font-size:14px;

  resize:vertical;

}

.settings-area textarea{

  min-height:140px;

}

.settings-area button{

  margin-top:15px;
  margin-right:10px;

  padding:10px 18px;

  border:none;

  cursor:pointer;

  font-weight:bold;

}

#saveProfileButton{

  background:#57b36d;

  color:white;

}

#saveProfileButton:hover{

  background:#4aa760;

}

#cancelButton{

  background:#d9d9d9;

}

#cancelButton:hover{

  background:#c9c9c9;

}
