/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* ── Inline icon system (shared/_icon.html.erb) ── */
.icn {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icn-solid { fill: currentColor; stroke: none; }

/* ── Global chat message styles (widget + public pages) ── */

.msg {
  max-width: 78%;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}
.msg-user  { align-self: flex-end; }
.msg-admin { align-self: flex-start; }

.msg-grouped { margin-bottom: 2px; }
.msg-grouped .msg-bubble { border-radius: 12px !important; }

.msg-sender {
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 3px;
  padding-left: 4px;
}

.msg-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.msg-user  .msg-bubble {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.msg-admin .msg-bubble {
  background: rgba(255,255,255,0.13);
  color: #fff;
  border-bottom-left-radius: 3px;
}

.msg-time {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
  padding: 0 4px;
}
.msg-user  .msg-time { text-align: right; }
.msg-admin .msg-time { text-align: left; }

.msg-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
  cursor: pointer;
  object-fit: cover;
}

.msg-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  background: rgba(255,255,255,0.12);
  padding: 5px 10px;
  border-radius: 8px;
  word-break: break-all;
}
.msg-file:hover { background: rgba(255,255,255,0.2); }

.msg-date-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 4px;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  align-self: stretch;
}
.msg-date-sep::before,
.msg-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.chat-file-btn {
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 17px;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
  user-select: none;
  display: inline-flex;
  align-items: center;
}
.chat-file-btn:hover { color: rgba(255,255,255,0.85); }

.chat-upload-preview {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  padding: 2px 4px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Accessible focus states for marketing nav + buttons ── */
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--color-accent-500, #f97316);
  outline-offset: 3px;
  border-radius: 6px;
}
