/* 🌊 SKYBRIZ – Messages Layout (themed) */
.messages-wrapper {
  display: flex;
  max-width: 1000px;
  margin: 40px auto;
  background: linear-gradient(145deg, #001f3f, #003566, #0077b6);
  border-radius: 16px;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #dff6ff;
  box-shadow: 0 6px 25px rgba(0, 217, 255, 0.1);
}

/* Sidebar */
.inbox-sidebar {
  width: 30%;
  background-color: rgba(0, 43, 91, 0.4);
  border-right: 1px solid rgba(0, 217, 255, 0.15);
  padding: 1.5rem;
  overflow-y: auto;
  height: 600px;
}

.inbox-sidebar h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #00d4ff;
  border-bottom: 2px solid #00d4ff;
  padding-bottom: 0.5rem;
}

/* Inbox Items */
.inbox-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(62, 207, 142, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.inbox-item:hover {
  background-color: rgba(62, 207, 142, 0.1);
}

.inbox-item.active {
  background: linear-gradient(to right, #00d4ff, #0077b6);
  color: #001219;
  font-weight: 700;
  box-shadow: inset 3px 0 0 0 #3ecf8e;
}

/* Avatar */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
  border: 2px solid #00d4ff;
}

/* Inbox Text */
.inbox-text {
  flex-grow: 1;
  line-height: 1.2;
}
.inbox-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}
.inbox-text span {
  font-size: 0.875rem;
  color: #cbe9ff;
}

/* Message Thread */
.message-thread {
  width: 70%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 43, 91, 0.4);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.message-thread h3 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d4ff;
  border-bottom: 2px solid #00d4ff;
  padding-bottom: 0.5rem;
}

/* Messages Container */
.messages-container {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  max-height: 460px;
  scroll-behavior: smooth;
  padding-right: 10px;
}

/* Individual Messages */
.message-item {
  margin: 10px 0;
  max-width: 80%;
  display: flex;
  flex-direction: column;
}

/* Align sent vs received */
.message-item.receiver {
  margin-right: auto;
  text-align: left;
}
.message-item.sender {
  margin-left: auto;
  text-align: right;
}

/* Message Bubbles */
.message-bubble {
  background-color: rgba(209, 233, 255, 0.1);
  color: #dff6ff;
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  box-shadow: 0 6px 25px rgba(0, 217, 255, 0.1);
  word-wrap: break-word;
}

/* Receiver (incoming) = green */
.message-item.receiver .message-bubble {
  background: linear-gradient(to right, #3ecf8e, #26b07c);
  color: #001219;
  box-shadow: none;
}

/* Sender (you) = iMessage-style blue */
.message-item.sender .message-bubble {
  background: linear-gradient(to right, #5ac8fa, #007aff);
  color: #fff;
  box-shadow: none;
}

/* Timestamp */
.message-time {
  font-size: 0.75rem;
  color: #cbe9ff;
  margin-top: 4px;
  font-style: italic;
}

/* Send Message Form */
.send-message-form {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.send-message-form textarea {
  flex-grow: 1;
  height: 50px;
  resize: none;
  padding: 12px 16px;
  border-radius: 30px;
  border: 1.5px solid rgba(209, 233, 255, 0.5);
  background-color: rgba(209, 233, 255, 0.1);
  color: #dff6ff;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.send-message-form textarea:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
  outline: none;
}

/* Send Button */
.send-message-form button {
  padding: 0.75rem 1.5rem;
  border: none;
  background: linear-gradient(to right, #00d4ff, #0077b6);
  color: #001219;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.send-message-form button:hover {
  background: linear-gradient(to right, #0077b6, #00d4ff);
  transform: translateY(-2px);
}

/* File Upload & Attachments */
.file-upload-label {
  font-size: 1.5rem;
  cursor: pointer;
  color: #00d4ff;
  user-select: none;
  transition: color 0.3s ease;
}

.file-upload-label:hover {
  color: #0077b6;
}

#attachment-preview {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.message-attachment,
.attachments img {
  max-width: 150px;
  max-height: 100px;
  border-radius: 8px;
  box-shadow: 0 6px 25px rgba(0, 217, 255, 0.1);
  object-fit: cover;
}

.options-menu {
  background: #1a1a2e;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  min-width: 180px;
  font-size: 14px;
  color: #eee;
  overflow: hidden;
}
.option-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #333;
}
.option-item:last-child {
  border-bottom: none;
}
.option-item:hover {
  background: #2a2a4a;
}
