/* Customer Chat Shell - v2 Rebuild
   Structure-first, minimal styling
   ================================ */

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background: #ffffff;
}

/* Shell Container - Full viewport */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* ================================
   HEADER AREA
   ================================ */
.chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

/* Header Identity Display */
.chat-header-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #111827;
}

.chat-header-business {
  font-weight: 600;
}

.chat-header-separator {
  color: #9ca3af;
}

.chat-header-role {
  font-weight: 500;
  color: #4b5563;
}

.chat-header-title {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.chat-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.chat-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Overflow Menu */
.chat-menu {
  position: absolute;
  top: 100%;
  right: 16px;
  z-index: 100;
  min-width: 140px;
  padding: 4px 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.chat-menu.chat-menu--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.chat-menu-item:hover {
  background: #f3f4f6;
}

.chat-menu-item:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

/* ================================
   MESSAGE STREAM AREA
   ================================ */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message bubbles */
.chat-message {
  max-width: 85%;
  display: flex;
  flex-direction: column;
}

.chat-message--user {
  align-self: flex-end;
}

.chat-message--assistant {
  align-self: flex-start;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

/* Digital Employee Icon (assistant messages only) */
.chat-message-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.chat-message-icon--sales {
  background: #3b82f6; /* Blue for Sales */
}

.chat-message-icon--support {
  background: #10b981; /* Green for Support */
}

.chat-message-icon--default {
  background: #6b7280; /* Gray default */
}

.chat-message-content {
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-message--user .chat-message-content {
  background: #3b82f6;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-message--assistant .chat-message-content {
  background: #f3f4f6;
  color: #1f2937;
  border-bottom-left-radius: 4px;
}

/* Markdown content styling */
.chat-message-content p {
  margin: 0 0 0.5em 0;
}

.chat-message-content p:last-child {
  margin-bottom: 0;
}

.chat-message-content ul,
.chat-message-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.chat-message-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 0.15em 0.3em;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.chat-message--user .chat-message-content code {
  background: rgba(255, 255, 255, 0.2);
}

.chat-message-content pre {
  margin: 0.5em 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  overflow-x: auto;
}

.chat-message-content pre code {
  padding: 0;
  background: transparent;
}

.chat-message-content a {
  color: inherit;
  text-decoration: underline;
}

.chat-message--user .chat-message-content a {
  color: #ffffff;
}

/* Thinking indicator */
.chat-message--thinking .chat-message-content {
  display: flex;
  align-items: center;
  gap: 4px;
}

.thinking-dots {
  display: inline-flex;
  gap: 3px;
}

.thinking-dots span {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: thinking-bounce 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
.thinking-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes thinking-bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ================================
   COMPOSER AREA
   ================================ */
.chat-composer {
  flex-shrink: 0;
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.chat-composer-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-composer-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-composer-input::placeholder {
  color: #9ca3af;
}

.chat-composer-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.chat-composer-input:disabled {
  background: #f9fafb;
  cursor: not-allowed;
}

.chat-composer-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chat-composer-send:hover:not(:disabled) {
  background: #2563eb;
}

.chat-composer-send:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.chat-composer-send:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ================================
   HANDOFF CONFIRMATION
   ================================ */
.chat-handoff {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

.chat-handoff-text {
  font-size: 13px;
  color: #92400e;
  margin-bottom: 10px;
}

.chat-handoff-actions {
  display: flex;
  gap: 8px;
}

.chat-handoff-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease;
}

.chat-handoff-btn--yes {
  background: #10b981;
  color: #ffffff;
}

.chat-handoff-btn--yes:hover {
  background: #059669;
}

.chat-handoff-btn--no {
  background: #e5e7eb;
  color: #374151;
}

.chat-handoff-btn--no:hover {
  background: #d1d5db;
}

/* ================================
   CONFIRMATION DIALOG
   ================================ */

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.confirm-overlay.confirm-overlay--open {
  opacity: 1;
  visibility: visible;
}

.confirm-dialog {
  background: #ffffff;
  width: calc(100% - 32px);
  max-width: 360px;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.confirm-overlay--open .confirm-dialog {
  transform: scale(1);
}

.confirm-title {
  margin: 0 0 8px 0;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.confirm-desc {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease;
}

.confirm-btn--danger {
  background: #ef4444;
  color: #ffffff;
}

.confirm-btn--danger:hover {
  background: #dc2626;
}

.confirm-btn--cancel {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.confirm-btn--cancel:hover {
  background: #e5e7eb;
}

/* ================================
   LOGOUT NOTICE
   ================================ */

.logout-notice {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.logout-notice-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.logout-notice-text {
  font-size: 13px;
  color: #92400e;
  line-height: 1.4;
}

.logout-notice-btn {
  align-self: flex-start;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #d97706;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #92400e;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.logout-notice-btn:hover {
  background: #fffbeb;
  border-color: #b45309;
}

.logout-notice-btn:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

/* Responsive - single line on wider screens */
@media (min-width: 400px) {
  .logout-notice-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .logout-notice-btn {
    flex-shrink: 0;
  }
}

/* ================================
   ESCALATION FORM
   ================================ */

/* Overlay */
.escalation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.escalation-overlay.escalation-overlay--open {
  opacity: 1;
  visibility: visible;
}

/* Panel */
.escalation-panel {
  background: #ffffff;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.escalation-overlay--open .escalation-panel {
  transform: translateY(0);
}

/* Header Section */
.escalation-header {
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 16px;
}

.escalation-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.escalation-subtitle {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* Form */
.escalation-form {
  padding: 0 20px 20px 20px;
}

/* Section Grouping */
.escalation-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.escalation-section.escalation-section--hidden {
  display: none;
}

/* Field Rows */
.escalation-row {
  display: flex;
  gap: 12px;
}

.escalation-row .escalation-field {
  flex: 1;
}

/* Fields */
.escalation-field {
  margin-bottom: 16px;
}

.escalation-field:last-child {
  margin-bottom: 0;
}

.escalation-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.escalation-required {
  color: #ef4444;
  font-weight: 400;
}

.escalation-optional {
  color: #9ca3af;
  font-weight: 400;
  font-size: 13px;
}

.escalation-field input,
.escalation-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.escalation-field input::placeholder,
.escalation-field textarea::placeholder {
  color: #9ca3af;
}

.escalation-field input:focus,
.escalation-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.escalation-field input.escalation-field--error,
.escalation-field textarea.escalation-field--error {
  border-color: #ef4444;
}

.escalation-field input.escalation-field--error:focus,
.escalation-field textarea.escalation-field--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.escalation-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Field-level Errors */
.escalation-field-error {
  display: block;
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  min-height: 16px;
}

/* Actions */
.escalation-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

/* Buttons */
.escalation-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  border: none;
}

.escalation-btn--primary {
  background: #3b82f6;
  color: #ffffff;
}

.escalation-btn--primary:hover:not(:disabled) {
  background: #2563eb;
}

.escalation-btn--primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.escalation-btn--secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.escalation-btn--secondary:hover {
  background: #e5e7eb;
}

/* State Containers */
.escalation-state {
  display: none;
  padding: 40px 20px;
  text-align: center;
}

.escalation-state.escalation-state--active {
  display: block;
}

/* Hide form when showing states */
.escalation-form.escalation-form--hidden {
  display: none;
}

.escalation-header.escalation-header--hidden {
  display: none;
}

/* Sending State */
.escalation-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: escalation-spin 0.8s linear infinite;
}

@keyframes escalation-spin {
  to { transform: rotate(360deg); }
}

.escalation-sending p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* Success State */
.escalation-success h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.escalation-success p {
  margin: 0 0 8px 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.escalation-hint {
  color: #9ca3af !important;
  font-size: 13px !important;
  margin-bottom: 0 !important;
}

/* Error State */
.escalation-error h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.escalation-error p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

/* Icons */
.escalation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.escalation-icon--success {
  background: #10b981;
  color: #ffffff;
}

.escalation-icon--error {
  background: #fef2f2;
  color: #ef4444;
}

/* Responsive - Desktop centered modal */
@media (min-width: 500px) {
  .escalation-overlay {
    align-items: center;
  }

  .escalation-panel {
    max-width: 440px;
    border-radius: 16px;
    max-height: 85vh;
  }
}

/* ================================
   LOGIN OVERLAY (Loop 5B)
   ================================ */

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.login-overlay.login-overlay--open {
  opacity: 1;
  visibility: visible;
}

.login-form-container {
  background: #ffffff;
  width: calc(100% - 32px);
  max-width: 360px;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.login-overlay--open .login-form-container {
  transform: scale(1);
}

.login-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.login-subtitle {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.login-error span {
  font-size: 13px;
  color: #dc2626;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.login-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-field input::placeholder {
  color: #9ca3af;
}

.login-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.login-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  border: none;
}

.login-btn--primary {
  background: #3b82f6;
  color: #ffffff;
}

.login-btn--primary:hover:not(:disabled) {
  background: #2563eb;
}

.login-btn--primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.login-btn--secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.login-btn--secondary:hover {
  background: #e5e7eb;
}

.login-links {
  margin-top: 16px;
  text-align: center;
}

.login-links a {
  font-size: 13px;
  color: #3b82f6;
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

/* Login sending state */
.login-sending {
  padding: 40px 20px;
  text-align: center;
}

.login-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.login-sending p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* ================================
   FILE ATTACHMENTS
   ================================ */

/* Attachment button (paperclip) */
.chat-composer-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.chat-composer-attach:hover:not(:disabled) {
  background: #f3f4f6;
  color: #374151;
}

.chat-composer-attach:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.chat-composer-attach:disabled {
  color: #d1d5db;
  cursor: not-allowed;
}

/* Staged Attachments Area */
.staged-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

/* Attachment Chip */
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  transition: border-color 0.15s ease;
}

.attachment-chip--pending {
  border-color: #3b82f6;
  background: #eff6ff;
}

.attachment-chip--uploaded {
  border-color: #10b981;
  background: #ecfdf5;
}

.attachment-chip--failed {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Attachment chip icon */
.attachment-chip-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #6b7280;
}

.attachment-chip--pending .attachment-chip-icon {
  color: #3b82f6;
  animation: attachment-pulse 1.5s ease-in-out infinite;
}

.attachment-chip--uploaded .attachment-chip-icon {
  color: #10b981;
}

.attachment-chip--failed .attachment-chip-icon {
  color: #ef4444;
}

@keyframes attachment-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Attachment filename */
.attachment-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

/* Attachment remove button */
.attachment-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.attachment-chip-remove:hover {
  background: #f3f4f6;
  color: #374151;
}

.attachment-chip--failed .attachment-chip-remove:hover {
  background: #fecaca;
  color: #dc2626;
}

/* Attachment error tooltip */
.attachment-chip-error {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: #1f2937;
  color: #ffffff;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  margin-bottom: 6px;
  z-index: 10;
}

.attachment-chip-error::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
}

.attachment-chip--failed {
  position: relative;
}

.attachment-chip--failed:hover .attachment-chip-error {
  display: block;
}

/* Attachment count indicator */
.attachment-count {
  font-size: 12px;
  color: #6b7280;
  padding: 4px 0;
}

/* ================================
   UTILITY CLASSES
   ================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
