* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
#chat-container {
    display: flex
;
    justify-content: space-between;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    flex-direction: column;
    z-index: 9999;
    background: #fff;
    padding: 4.5em 0;
}
.chat-header {
    height: 4em;
    display: flex
;
    justify-content: space-between;
    padding: .5em 1em;
    align-items: center;
    position: fixed;
    width: 100%;
    background: #fff;
    top: 0;
}
.chat-header button {
    border: none;
    background: #fff;
    font-size: 1em;
    color: #000;
}
.chat-header .first-sec {
    display: flex;
    align-items: center;
}
.chat-header .first-sec img {

    width: 3em;
    height: 3em;
    border-radius: 50%;
    margin: 1em;
}
.pack {
    display: flex;
    align-items: center;
}
.message-area {
    display: flex;
    flex-direction: column;
    padding: .5em 1em;
    overflow: scroll;
    flex: 1;
}
.period {
    align-self: center;
    margin: 2em 0;
    font-size: .9em;
}
.message-item {
    padding: .1em;
    width: 80%;
    align-self: start;
}
.message-item p {
    text-wrap: revert-layer;
    max-width: 70%;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: .5em;
    border-radius: .6em;
}
.replied-message {
    font-style: italic;
    font-size: .8em;
    color: #999;
    margin: .2em 0;
    width: 50%;
}
.replied-message a {
    color: #999;
    text-decoration: none;
}
.inchat-image {
    width: 100%;
    border-radius: .6em;
    margin-bottom: .1em;
}
.receiving {
    align-self: start;
    margin-bottom: .2em;
    display: flex;
    flex-direction: column;
    align-items: start;
}
.receiving p {
    background: #f0f0f0;
}
.sent {
    align-self: end;
    margin-bottom: .2em;
    display: flex
;
    flex-direction: column;
    align-items: end;
}
.sent p {
    background: #f8c203;
}

.voicenote-message {
    width: 60%;
}
.chat-footer {
    padding: .5em;
    min-height: 5em;
    max-height: 12em;
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    position: fixed;
    bottom: 0;
    background: #fff;
}
.main-messages {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding-top: 1em;
    height: 4em;
    gap: 1em;
}
span.message-status {
    font-size: .8em;
    color: #999;
}
.main-messages .custom-input {
    flex: 1;
    height: 100%;
}
.chat-footer button {
    border: none;
    background: #fff;
    font-size: 1.1em;
}
.preview-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    max-height: 7em;
}
.preview-area .image-preview img, .preview-area .video-preview video {
    height: 5em;
    width: 5em;
    border-radius: .4em;
   
}
.preview-area .image-preview, .preview-area .video-preview {
     align-self: end;
    margin-left: auto;
}
.message-item video {
    width: 100%;
    border-radius: .4em;
    background: #999;
}
.voice-note-component {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', sans-serif;
  width: 100%;
  min-width: 60%;
}

.play-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.play-button:hover {
  background: #e0e0e0;
}

.waves {
  position: relative;
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress {
  position: absolute;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4a90e2, #007aff);
  border-radius: 4px;
  transition: width 0.2s ease;
}

.voicenote-duration {
  font-size: 0.9rem;
  color: #444;
  min-width: 35px;
}
button#scroll-down {
    height: auto !important;
    width: 2.5em;
    background: #f0f0f0 !important;
    -webkit-text-stroke: 1px #000;
    bottom: 4em !important;
    left: 1em !important;
    padding: .5em 1em !important;
    border-radius: 9999px !important;
}
.replied-message span {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    white-space: nowrap;
}