/* Importing Google Fonts - poppins*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins","sans-serif";
}

body{
    height: 100vh;
    width: 100%;
    background-position: center;
    background-size: cover;
}

/* Custom Navbar Styles */
.custom-navbar {
    position: fixed;
    display: fixed;
    flex-direction: column;
    width: 100%;
    position: fixed; /* Fix the navbar to the top */
    top: 0;
    left: 0;  
    background-color: #2c3e50; /* Background color */
}

.custom-navbar .navbar-top {
    display: flex;
    justify-content: center;  /*Center the content horizontally */
    align-items: center;  /*Center the content vertically */
    border: 1px solid #111;
    height: 60px; /* Adjust height as needed */
    background-color: #011a33; /* Adjust background color as needed */
}
.custom-navbar .navbar-top a:hover{
    text-decoration: none;
}
.custom-navbar .navbar-top span{
    color: #000;
    font-size: 20px;
    font-weight: bold;
}
.custom-navbar .navbar-top .logo {
    display: flex;
    justify-content: center;  /*Center the content horizontally*/
    align-items: center;
}

.custom-navbar .navbar-top .logo img {
    height: 50px;
    margin-right: 10px;
    align-items: center;
    justify-content: center;  /*Center the content horizontally*/
    background-color: #fefefe;
    border-radius: 50%;
}
.custom-navbar .navbar-top .logo span {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}
.dash_header {
    position:fixed;
    width: 100px;
    background: white;
    margin-left: 250px;
    padding-left: 20px;
    border-radius: 5px;
    padding-top: 20px;
    margin-bottom: 10px;
}
.dash_header .intro {
    font-size: 1.5em;
    font-weight: bold;
}
.dashboard-container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  margin-top: 50px; /* height of navbar to push content down, alternatively use padding */
}

aside.sidebar {
  width: 250px;
  height: 750px;
  position: fixed;
  top: 50px;
  left: 0;
  /* other styles */
}

main {
  flex: 1; /* takes remaining space */
  margin-left: 250px; /* width of sidebar */
  overflow: auto;
  padding: 20px;
  background-color: #f0f4f8;
}
.Transaction_section{
    padding-top: 20px;
}

/*styling the messaging-app*/
.messaging-app {
  display: flex;
  flex-wrap: wrap;
  height: 100%;
  padding-top: 20px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.inbox-sidebar {
  width: 30%;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

.search-bar {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.search-bar input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.chat-item:hover {
  background: #f9f9f9;
}

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

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.message-input {
  border-top: 1px solid #ddd;
  padding: 10px;
  display: flex;
  align-items: center;
}

.message-input input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
}

.message-input button {
  margin-left: 10px;
  padding: 8px 16px;
  border: none;
  background: #00a5fd;
  color: white;
  border-radius: 20px;
  cursor: pointer;
}

.chat-message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    word-break: break-word;
}

.chat-message.sent {
    background-color: #d4f8c6;
    align-self: flex-end;
    border-top-right-radius: 0;
    text-align: right;
}

.chat-message.received {
    background-color: #f1f0f0;
    align-self: flex-start;
    border-top-left-radius: 0;
    text-align: left;
}

.timestamp {
    display: block;
    font-size: 11px;
    color: gray;
    margin-top: 4px;
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #e6edff;
}

.chat-header{
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.chat-header h3 {
    font-size: 24px;
    margin: 0 auto;
    position:  absolute;
    left: 50%;
    transform: translateX(-50%);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message .message-text {
    margin-bottom: 10px;
    font-size: 14px;
    color: black;
}

/* 🌐 Responsive Layout — WhatsApp-style for small screens */
@media screen and (max-width: 768px) {
  .messaging-app {
    flex-direction: column;
    height: 100vh;
    border-radius: 0;
    margin-left: 0;
    background: #fff;
    overflow: hidden;
  }

  .inbox-sidebar {
    width: 100%;
    height: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
  }

  .chat-area {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: #fff;
    transition: all 0.3s ease;
  }

  /* When conversation is open, hide sidebar & show chat area */
  .messaging-app.chat-active .inbox-sidebar {
    display: none;
  }
  .messaging-app.chat-active .chat-area {
    display: flex;
  }

  /* Back button (appears on small screens only) */
  .chat-header::before {
    content: "arrow_back";
    font-family: 'Material Icons';
    font-size: 26px;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #00a5fd;
    cursor: pointer;
    display: block;
  }

  /* Chat header adjustments */
  .chat-header {
    position: relative;
    padding: 10px 40px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    background: #f8f8f8;
  }

  .chat-header h3 {
    font-size: 18px;
    margin: 0;
  }

  /* Chat messages smaller & tighter layout */
  .chat-messages {
    padding: 10px;
  }

  .chat-message {
    max-width: 80%;
    font-size: 13px;
    padding: 8px 12px;
  }

  .message-input {
    padding: 8px;
  }

  .message-input input {
    font-size: 13px;
    padding: 8px;
  }

  .message-input button {
    padding: 6px 12px;
  }

  /* Sidebar items smaller */
  .chat-item {
    padding: 10px;
  }

  .sender-image {
    width: 45px;
    height: 45px;
    margin-right: 16px;
  }

  .search-bar input {
    font-size: 13px;
    padding: 6px;
  }

  #newMessageBtn .material-icons {
    font-size: 28px;
  }
}

/* 📱 Very Small Screens (max-width: 480px) */
@media screen and (max-width: 480px) {
  .chat-header h3 {
    font-size: 16px;
  }

  .chat-message {
    max-width: 85%;
    font-size: 12px;
  }

  .message-input input {
    font-size: 12px;
  }

  .message-input button .material-icons {
    font-size: 20px;
  }
}
