/* main container styles */
#main {
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: 8% auto 9%;
  grid-template-areas:
    'top'
    'msg'
    'inp';
}

/* File upload styles */
.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

#message-input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  min-width: 0;
  height: 45px;
  box-sizing: border-box;
  line-height: 1.5;
}

.upload-button {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
  margin: auto;
  top: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 10;
}

.upload-button:hover {
  transform: scale(1.1);
  background: rgba(59, 130, 246, 0.2);
}

.upload-button svg {
  transition: transform 0.2s ease;
}

.upload-button:hover svg {
  transform: scale(1.1);
}

/* Upload progress styles */
.upload-progress {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  z-index: 9999;
  display: none;
  width: 300px;
}

.progress-bar {
  height: 10px;
  background-color: #444;
  border-radius: 5px;
  margin: 10px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #3498db;
  width: 0%;
  transition: width 0.3s ease;
}

/* Toast notification styles */
.upload-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 9999;
  display: none;
}

/* File message styles */
.file-message {
  max-width: 300px;
  margin: 5px 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.file-message img {
  max-width: 100%;
  border-radius: 8px;
  cursor: pointer;
}

.file-message video {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  background-color: #000;
}

.file-message .file-caption {
  font-size: 0.8em;
  color: #888;
  margin-top: 5px;
}
