/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.app-shell {
  height: 100vh;
  height: 100dvh;
}

.chat-feed {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.08), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.022) 25%, transparent 25%) 0 0 / 24px 24px,
    #09090b;
}

.message-row {
  display: flex;
  justify-content: flex-start;
  padding-inline: 0.25rem;
}

.message-row.is-own {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(42rem, 88%);
  border-radius: 1rem 1rem 1rem 0.35rem;
  background: #18181b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  padding: 0.65rem 0.8rem;
}

.message-row.is-own .message-bubble {
  border-radius: 1rem 1rem 0.35rem 1rem;
  background: #3f1f23;
}

.message-row.is-own .message-bubble .text-red-200 {
  color: #fecaca;
}

.message-actions {
  opacity: 0;
  transition: opacity 120ms ease;
}

.message-bubble:hover .message-actions,
.message-bubble:focus-within .message-actions {
  opacity: 1;
}

.chat-composer-shell {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.composer-textarea {
  scrollbar-width: none;
}

.composer-textarea::-webkit-scrollbar {
  display: none;
}

.composer-input:focus-within {
  border-color: rgba(239, 68, 68, 0.45);
}

.attachment-preview-item img,
.attachment-preview-item video {
  display: block;
}

@media (max-width: 767px) {
  .chat-header {
    min-height: 3.75rem;
  }

  .chat-feed {
    padding-bottom: 1rem;
  }

  .message-bubble {
    max-width: min(92%, 28rem);
    padding: 0.55rem 0.7rem;
  }

  .message-actions {
    opacity: 1;
  }

  .message-actions button,
  .message-actions input[type="submit"] {
    min-height: 2rem;
  }

  .message-bubble img,
  .message-bubble video {
    max-height: 22rem;
  }

  .chat-composer {
    width: 100%;
  }

  .composer-icon-button,
  .composer-send {
    height: 2.75rem;
    width: 2.75rem;
  }

  .composer-input {
    min-height: 2.75rem;
  }
}
