/* =========================================================
   TAMILAI COMPOSER V3
========================================================= */

/* ==========================
   INPUT AREA
========================== */

.input-area {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;

  display: flex;
  justify-content: center;

  padding: 18px 24px;

background: var(--bg-primary);

  z-index: 1000;
}

/* ==========================
   COMPOSER
========================== */

.composer {
  position: relative;
  width: 100%;
  max-width: 820px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 28px;

  overflow: hidden;

  transition:
    height 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    transform 0.28s ease;

  box-shadow: var(--shadow);

  height: 50px;
}

/* Expanded */

.composer.expanded {
  min-height: 120px;
  height: auto;

  border-color: var(--primary);

  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent),
    var(--shadow);
}

/* ==========================
   TEXTAREA
========================== */

.composer-text {
  height: 56px;
  padding: 16px 22px;
  width: 100%;

  resize: none;

  border: none;

  outline: none;

  background: transparent;

  color: var(--text-primary);

  font-size: 16px;

  font-family: inherit;

  line-height: 1.6;

  overflow-y: hidden;

  transition: all 0.28s ease;
}

.composer.expanded .composer-text {
  height: 70px;

  padding-bottom: 10px;
}

.composer-text::placeholder {
  color: var(--input-placeholder);
  font-weight: 500;
  letter-spacing: 0.2px;
  opacity: 1;
}

/* ==========================
   TOOLBAR
========================== */

.composer-toolbar {
  height: 50px;

  display: flex;

  align-items: center;

  gap: 8px;

  padding: 0 16px;

  opacity: 0;

  transform: translateY(12px);

  pointer-events: none;

  transition: all 0.25s ease;
}

.composer.expanded .composer-toolbar {
  opacity: 1;

  transform: translateY(0);

  pointer-events: auto;
}

/* ==========================
   TOOL BUTTON
========================== */

.composer .tool-btn {
  width: 36px;

  height: 36px;

  border: none;

  border-radius: 10px;

  background: transparent;

  color: var(--text-primary);

  font-size: 18px;

  transition: 0.25s;
}

.composer .tool-btn:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}
/* ==========================
   SEND
========================== */

.send-btn {
  margin-left: auto;

  width: 42px;

  height: 42px;

  border: none;

  border-radius: 50%;

  background: var(--primary);

  color: var(--text-primary);

  font-size: 18px;

  transition: 0.25s;
}

.send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 45%, transparent);
}
.composer:focus-within {
  border-color: var(--primary);
}
#attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px;
}
.attachment-preview {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  padding: 0 16px;
}

.attachment-chip {
  display: flex;

  align-items: center;

  gap: 10px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 999px;

  padding: 8px 14px;

  color: var(--text-primary);

  animation: fadeIn 0.25s ease;
}

.remove-file {
  border: none;

  background: none;

  color:var(--danger);

  cursor: pointer;
}
@keyframes fadeIn {
  from {
    opacity: 0;

    transform: translateY(8px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}
.attach-context-menu {
  position: fixed;

  left: 18px;

  bottom: 72px;

  z-index: 99999;

  width: 230px;

  display: flex;

  flex-direction: column;

  gap: 8px;

  padding: 10px;

  border-radius: 18px;

 background:var(--surface);

  border:1px solid var(--border);

  backdrop-filter: blur(20px);

  box-shadow:var(--shadow);

  opacity: 0;

  visibility: hidden;

  transform: translateY(20px) scale(0.9);

  transition: 0.28s;
}

.attach-context-menu.active {
  opacity: 1;

  visibility: visible;

  transform: translateY(0) scale(1);
}
.attach-menu-item {
  display: flex;

  align-items: center;

  gap: 12px;

  width: 100%;

  border: none;

  background: transparent;

  color: var(--text-primary);

  padding: 12px 14px;

  border-radius: 12px;

  cursor: pointer;

  transition: 0.25s;

  font-size: 15px;
}

.attach-menu-item:hover {
 background:var(--surface-hover);

  transform: translateX(4px);
}
