
/* forward */

/* forward message  modal*/

.forward-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: newFadeIn 0.3s ease forwards;
}

.forward-container {
  width: 400px;
  max-width: 90%;
  max-height: 80vh;
  background-color: var(--secondBackground);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: newSlideUp 0.3s ease forwards;
}

.forward-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.forward-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--onSecondBackground);
}

.forward-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.forward-close-btn:hover {
  background-color: var(--tertiary);
}

.forward-close-btn svg {
  width: 14px;
  height: 14px;
  fill: var(--onSecondBackground);
}

.forward-message-preview {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  background-color: var(--tertiary);
  margin: 0 20px;
  margin-top: 16px;
  border-radius: 8px;
}

.forward-message-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.forward-message-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--primary);
  transform: rotate(180deg);
}

.forward-message-text {
  color: var(--onTertiary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.forward-search {
  padding: 16px 20px;
  position: relative;
  display: flex;
  align-items: center;
}

.forward-search input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background-color: var(--tertiary);
  color: var(--onTertiary);
  font-size: 14px;
  outline: none;
}

.forward-search input::placeholder {
  color: var(--placeholder);
}

.forward-search button {
  position: absolute;
  right: 30px;
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.forward-search button svg {
  width: 16px;
  height: 16px;
  fill: var(--placeholder);
}

.forward-contacts-list {
  overflow-y: auto;
  max-height: 400px;
  padding: 0 10px 20px 10px;
}

.forward-contacts-list::-webkit-scrollbar {
  width: 5px;
}

.forward-contacts-list::-webkit-scrollbar-track {
  background: transparent;
}

.forward-contacts-list::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 10px;
}

.forward-contact-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  animation: contactItemAppear 0.3s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

.forward-contact-item:hover {
  background-color: var(--tertiary);
}

.forward-contact-avatar {
  position: relative;
  margin-right: 12px;
}

.forward-contact-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.online-indicator {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--success);
  border-radius: 50%;
  bottom: 2px;
  right: 2px;
  border: 2px solid var(--secondBackground);
}

.forward-contact-details {
  flex: 1;
}

.forward-contact-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--onSecondBackground);
  margin-bottom: 3px;
}

.forward-contact-status {
  font-size: 12px;
  color: var(--placeholder);
}

.forward-button {
  display: flex;
  align-items: center;
}

.forward-button button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.forward-button button:hover {
  background-color: color-mix(in srgb, var(--primary), #fff 10%);
}

.forward-button button svg {
  width: 16px;
  height: 16px;
  transform: rotate(0deg);
}
.forward-button button .forward svg {
  fill: var(--onPrimary);
}
.forward-button button .chat svg {
  stroke: var(--onPrimary);
}

@keyframes newFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes newSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes contactItemAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forward-contact-item:nth-child(1) {
  animation-delay: 0.05s;
}
.forward-contact-item:nth-child(2) {
  animation-delay: 0.1s;
}
.forward-contact-item:nth-child(3) {
  animation-delay: 0.15s;
}
.forward-contact-item:nth-child(4) {
  animation-delay: 0.2s;
}
.forward-contact-item:nth-child(5) {
  animation-delay: 0.25s;
}

@media (max-width: 768px) {
  .forward-container {
    width: 320px;
  }

  .forward-message-text {
    max-width: 240px;
    font-size: 13px;
  }

  .forward-contact-name {
    font-size: 14px;
  }

  .forward-contact-avatar img {
    width: 38px;
    height: 38px;
  }

  .chat-container {
    animation: fadeInLeft 0.3s ease-in-out;
  }
}

@media (max-width: 768px) {
  .forward-container {
    width: 320px;
  }

  .forward-message-text {
    max-width: 240px;
    font-size: 13px;
  }

  .forward-contact-name {
    font-size: 14px;
  }

  .forward-contact-avatar img {
    width: 38px;
    height: 38px;
  }
}