/* Email Composer Component Styles */

.composer-dock {
  position: fixed;
  bottom: 0;
  right: 24px;
  width: 540px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100dvh - 64px);
  z-index: 1000;
  background: var(--popover-bg, #0f172a);
  border: 1px solid var(--popover-border, rgba(255, 255, 255, 0.12));
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), height 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s ease, border-radius 0.22s ease;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-primary, #f8fafc);
}

.composer-dock.maximized {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0;
  border: none;
  z-index: 25000;
  box-shadow: none;
}

.composer-dock.maximized .composer-drop-overlay {
  border-radius: 0;
}

.composer-dock .restore-icon {
  display: none;
}

.composer-dock.maximized .maximize-icon {
  display: none;
}

.composer-dock.maximized .restore-icon {
  display: block;
}

.composer-dock.minimized {
  height: 44px !important;
  max-height: 44px !important;
  inset: auto 24px 0 auto !important;
  top: auto !important;
  bottom: 0 !important;
  right: 24px !important;
  left: auto !important;
  width: 540px !important;
  max-width: calc(100vw - 32px) !important;
  border-radius: 14px 14px 0 0 !important;
  border: 1px solid var(--popover-border, rgba(255, 255, 255, 0.12)) !important;
  border-bottom: none !important;
}

.composer-dock.minimized .composer-content {
  display: none !important;
}

/* Header */
.composer-header {
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--popover-border, rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.composer-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-sync-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-secondary, #94a3b8);
  margin-left: 2px;
  flex-shrink: 0;
  cursor: help;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.composer-sync-icon.sync-saved {
  color: #10b981;
}

.composer-sync-icon.sync-saving {
  color: #818cf8;
}

.composer-sync-icon.sync-saving .sync-spinner-icon {
  animation: syncSpin 0.9s linear infinite;
}

@keyframes syncSpin {
  100% {
    transform: rotate(360deg);
  }
}

.composer-sync-icon.sync-error {
  color: #ef4444;
}

.composer-header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.composer-control-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.composer-control-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f8fafc);
}

/* Content Area */
.composer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#composer-form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Field Rows */
.composer-field-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid var(--card-border, rgba(255, 255, 255, 0.06));
  gap: 8px;
}

.composer-field-label {
  font-size: 0.8rem;
  color: var(--text-secondary, #94a3b8);
  width: 44px;
  flex-shrink: 0;
  font-weight: 500;
}

.composer-input,
.composer-select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #f8fafc);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 4px 0;
}

.composer-select {
  cursor: pointer;
}

.composer-recipient-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.composer-text-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.composer-text-btn:hover {
  color: var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.1);
}

.composer-subject-row {
  padding: 8px 14px;
}

.composer-subject-input {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Drop Overlay */
.composer-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(4px);
  border: 2px dashed var(--accent, #6366f1);
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: fadeInOverlay 0.15s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drop-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--accent, #6366f1);
  font-weight: 600;
  font-size: 1rem;
}

.drop-overlay-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  font-weight: 400;
}

/* Body / Editor */
.composer-body-wrap {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  overflow-y: auto;
  position: relative;
}

.composer-editor {
  flex: 1;
  width: 100%;
  min-height: 140px;
  outline: none;
  border: none;
  background: transparent;
  color: var(--text-primary, #f8fafc);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
  box-sizing: border-box;
  overflow-y: auto;
  word-break: break-word;
}

.composer-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-secondary, #64748b);
  pointer-events: none;
  display: block;
}

/* Rich Text Formatting Styles in Editor */
.composer-editor ul {
  list-style-type: disc;
  margin: 6px 0;
  padding-left: 24px;
}

.composer-editor ul ul {
  list-style-type: circle;
  margin: 2px 0;
  padding-left: 20px;
}

.composer-editor ul ul ul {
  list-style-type: square;
}

.composer-editor ol {
  list-style-type: decimal;
  margin: 6px 0;
  padding-left: 24px;
}

.composer-editor ol ol {
  list-style-type: lower-alpha;
  margin: 2px 0;
  padding-left: 20px;
}

.composer-editor ol ol ol {
  list-style-type: lower-roman;
}

.composer-editor li {
  margin: 2px 0;
  line-height: 1.5;
}

.composer-editor a {
  color: #818cf8;
  text-decoration: underline;
  cursor: pointer;
  word-break: break-all;
}

.composer-editor mark,
.composer-editor .highlight-yellow {
  background-color: #fef08a !important;
  color: #0f172a !important;
  padding: 1px 3px;
  border-radius: 2px;
}

.composer-editor .highlight-green {
  background-color: #bbf7d0 !important;
  color: #0f172a !important;
  padding: 1px 3px;
  border-radius: 2px;
}

.composer-editor .highlight-blue {
  background-color: #bae6fd !important;
  color: #0f172a !important;
  padding: 1px 3px;
  border-radius: 2px;
}

.composer-editor .highlight-pink {
  background-color: #fbcfe8 !important;
  color: #0f172a !important;
  padding: 1px 3px;
  border-radius: 2px;
}

/* Media Embeds (Images / Videos positioned at cursor) */
.composer-media-embed {
  display: block;
  position: relative;
  margin: 10px 0;
  max-width: 100%;
  user-select: none;
}

.composer-media-embed.loading {
  min-width: 240px;
  max-width: 320px;
  min-height: 110px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--card-border, rgba(255, 255, 255, 0.18));
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.composer-media-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent, #6366f1);
  border-radius: 50%;
  animation: composerMediaSpin 0.75s linear infinite;
}

@keyframes composerMediaSpin {
  to { transform: rotate(360deg); }
}

.composer-media-status {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  font-weight: 500;
}

.media-preview-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.composer-media-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  transition: max-width 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.composer-media-embed[data-variation="small"] .composer-media-img {
  max-width: 280px;
}

.composer-media-embed[data-variation="medium"] .composer-media-img {
  max-width: 440px;
}

.composer-media-embed[data-variation="large"] .composer-media-img {
  max-width: 100%;
}

.composer-media-embed[data-variation="original"] .composer-media-img {
  max-width: 100%;
}

.composer-media-video {
  display: block;
  max-width: 720px;
  max-height: 720px;
  width: 100%;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}

.composer-media-gif {
  display: block;
  max-width: 720px;
  max-height: 720px;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  object-fit: contain;
}

/* Floating Hover Size Selector */
.composer-media-picker {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 3px 5px;
  gap: 3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.composer-media-embed:hover .composer-media-picker {
  display: flex;
  align-items: center;
}

.media-var-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.media-var-btn:hover:not(:disabled):not(.disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.media-var-btn.active {
  background: var(--accent, #6366f1);
  color: #ffffff;
  font-weight: 600;
}

.media-var-btn:disabled,
.media-var-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
  color: #ef4444;
}

.media-remove-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
  transition: background 0.15s ease;
}

.media-remove-btn:hover {
  background: rgba(239, 68, 68, 0.4);
}

.media-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Attachments Tray */
.composer-attachments-tray {
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--card-border, rgba(255, 255, 255, 0.06));
  background: rgba(0, 0, 0, 0.1);
  max-height: 90px;
  overflow-y: auto;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-primary, #f8fafc);
}

.attachment-chip-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip-size {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.7rem;
}

.attachment-chip-var-select {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 4px;
  cursor: pointer;
  outline: none;
}

.attachment-chip-remove {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  line-height: 1;
}

.attachment-chip-remove:hover {
  color: #ef4444;
}

/* Footer */
.composer-footer {
  min-height: 48px;
  height: auto;
  padding: 6px 12px;
  border-top: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: visible;
  gap: 8px;
}

.composer-footer-left {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}

.composer-footer-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}

/* Formatting Toolbar */
.composer-formatting-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  flex: 1;
  min-width: 0;
}

.composer-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.composer-toolbar-group:not(:last-child)::after {
  content: "";
  display: block;
  width: 1px;
  height: 16px;
  background: var(--card-border, rgba(255, 255, 255, 0.12));
  margin: 0 4px;
  flex-shrink: 0;
}

.composer-toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary, #94a3b8);
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease;
  padding: 0;
  flex-shrink: 0;
}

.composer-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f8fafc);
}

.composer-toolbar-btn.active {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
}

.composer-toolbar-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #f8fafc);
  height: 24px;
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 1px 3px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.composer-toolbar-select:focus {
  border-color: var(--accent, #6366f1);
}

.composer-toolbar-select.font-family-select {
  width: 58px;
}

.composer-toolbar-select.font-size-select {
  width: 60px;
}

.composer-toolbar-select option {
  background: #0f172a;
  color: #f8fafc;
}

/* Highlight Indicator Bar under icon */
.highlight-indicator-bar {
  position: absolute;
  bottom: 2px;
  left: 5px;
  right: 5px;
  height: 2.5px;
  border-radius: 2px;
  background-color: #fef08a;
  pointer-events: none;
}

/* Popovers common styling */
.composer-popover {
  position: absolute;
  z-index: 2100;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 10px;
  font-size: 0.8rem;
  color: var(--text-primary, #f8fafc);
  animation: composerPopoverIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes composerPopoverIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popover-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.popover-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.popover-field label {
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
  font-weight: 500;
}

.popover-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--text-primary, #f8fafc);
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.12s ease;
}

.popover-input:focus {
  border-color: var(--accent, #6366f1);
  background: rgba(255, 255, 255, 0.09);
}

.popover-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.popover-btn-primary {
  background: var(--accent, #6366f1);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}

.popover-btn-primary:hover {
  opacity: 0.9;
}

.popover-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #94a3b8);
  border: none;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.popover-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary, #f8fafc);
}

.popover-btn-danger {
  background: none;
  color: #ef4444;
  border: none;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 2px 4px;
}

.popover-btn-danger:hover {
  text-decoration: underline;
}

/* Highlight Popover */
.composer-highlight-popover {
  width: 215px;
}

.highlight-swatches {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.highlight-swatch-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.highlight-swatch-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.swatch-sample {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.swatch-clear-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #ef4444;
}

.swatch-label {
  font-size: 0.65rem;
  color: var(--text-secondary, #94a3b8);
}

/* Link Popover */
.composer-link-popover {
  width: 260px;
}

/* Emoji Popover */
.composer-emoji-popover {
  width: 270px;
  padding: 8px;
}

.emoji-popover-search-wrap {
  margin-bottom: 6px;
}

.emoji-search-input {
  width: 100%;
  box-sizing: border-box;
}

.emoji-category-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.emoji-category-tabs::-webkit-scrollbar {
  display: none;
}

.emoji-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}

.emoji-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #f8fafc);
}

.emoji-tab-btn.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-weight: 600;
}

.emoji-grid-container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.emoji-grid-container::-webkit-scrollbar {
  width: 4px;
}

.emoji-grid-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.emoji-item-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  padding: 4px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, transform 0.1s;
}

.emoji-item-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.18);
}

.composer-send-btn {
  background: var(--accent, #6366f1);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.composer-send-btn:hover {
  opacity: 0.92;
}

.composer-send-btn:active {
  transform: scale(0.98);
}

.send-shortcut-kbd {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.8;
}

.composer-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.composer-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f8fafc);
}

.composer-icon-btn.discard-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.composer-sync-status {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
}

/* Sidebar Compose Button */
.compose-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--accent, #6366f1);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transition: opacity 0.15s, transform 0.1s;
}

.compose-btn:hover {
  opacity: 0.92;
}

.compose-btn:active {
  transform: scale(0.98);
}

.compose-btn-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compose-shortcut-hint {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  opacity: 0.85;
}

/* Mobile Full-Screen Layout */
@media (max-width: 768px), (pointer: coarse) and (max-height: 550px) {
  .composer-dock {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0;
    border: none;
    right: 0;
    bottom: 0;
    z-index: 25000;
    box-shadow: none;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .composer-dock.minimized {
    height: 100dvh !important;
  }

  #composer-minimize-btn,
  #composer-maximize-btn {
    display: none;
  }

  .send-shortcut-kbd {
    display: none;
  }
}

/* Recipient Autocomplete Suggestions */
.composer-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 58px;
  right: 14px;
  background: var(--card-bg, #1e293b);
  border: 1px solid var(--popover-border, rgba(255, 255, 255, 0.15));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

.composer-suggestion-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-primary, #f8fafc);
  transition: background 0.12s ease;
}

.composer-suggestion-item:hover,
.composer-suggestion-item.active {
  background: var(--button-hover, rgba(255, 255, 255, 0.1));
}

.composer-suggestion-name {
  font-weight: 500;
  color: var(--text-primary, #f8fafc);
  margin-right: 8px;
}

.composer-suggestion-email {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.78rem;
}
