/* C — Dense messenger. Cream / Produce / Tomato / Ink / Sage / Gold. */

:root {
  --aisle-sage-ink: #5B8C5A;
}

/* Matches list */
.aisle-matches-title {
  font-size: 32px;
  letter-spacing: -0.9px;
  padding: 2px 0 12px;
}

.match-card.aisle-match-row {
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 8px !important;
  margin-bottom: 8px;
  border-radius: 16px;
}

.aisle-unread-col {
  width: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aisle-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aisle-sage-ink);
}

.match-card.aisle-match-row .aisle-avatar,
.match-card.aisle-match-row .match-avatar {
  width: 48px !important;
  height: 48px !important;
}

.match-open-profile.aisle-match-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 2px;
  cursor: pointer;
}

.aisle-match-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.aisle-match-top .match.name {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--aisle-ink);
  letter-spacing: -0.25px;
  white-space: nowrap;
  overflow: hidden;
  text-align: left;
  min-width: 0;
  flex: 1;
}

.aisle-match-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aisle-match-top .intent-badge,
.match-recipe-bulb {
  flex-shrink: 0;
}

.match-recipe-bulb {
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: pointer;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.match-recipe-bulb img {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.aisle-match-time {
  font-size: 11px;
  font-weight: 500;
  color: var(--aisle-muted);
  flex-shrink: 0;
}

.aisle-match-time:empty {
  display: none;
}

.aisle-match-preview {
  font-size: 13px;
  line-height: 1.3;
  color: var(--aisle-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  width: 100%;
}

.aisle-match-preview:empty {
  display: none;
}

.aisle-match-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1px;
  width: 100%;
  text-align: left;
}

.aisle-match-main > .aisle-match-reason {
  margin: 0;
  color: var(--aisle-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

.aisle-match-row .aisle-match-info .score-badge,
.aisle-match-row .aisle-match-pct,
.match-card.aisle-match-row .score-badge,
.aisle-match-meta .score-badge,
.aisle-match-meta .aisle-match-pct {
  display: inline !important;
  margin: 0;
  background: none !important;
  color: var(--aisle-pct) !important;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.aisle-row-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 50%;
  background: var(--aisle-sage-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.aisle-your-turn {
  font-size: 12px;
  font-weight: 500;
  color: var(--aisle-muted);
}

.aisle-match-row .chat-btn {
  padding: 8px 16px !important;
  font-size: 13px;
  flex-shrink: 0;
}

/* Nav unread badge */
.nav-glyph-wrap {
  position: relative;
  display: inline-flex;
}

.nav-unread-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 50%;
  background: var(--aisle-tomato);
  color: #fff;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

/* Thread */
.screen.active.aisle-chat-c-thread {
  padding: 0 0 100px;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
}

.aisle-chat-c-thread .header.aisle-subview-header {
  background: var(--aisle-cream);
  border-bottom: 1px solid rgba(28, 25, 23, 0.06);
  padding: 8px 8px;
}

.aisle-chat-c-thread .aisle-header-title {
  gap: 8px;
}

.aisle-chat-c-thread .aisle-header-title span {
  font-size: 16px;
  font-weight: 700;
}

.aisle-chat-c-thread .score-badge {
  margin-top: 0;
  background: var(--aisle-gold) !important;
  color: var(--aisle-ink) !important;
  font-size: 12px;
  padding: 3px 8px;
}

.header.aisle-subview-header .aisle-header-menu,
.profile-card > .aisle-header-menu {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--aisle-ink);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 1px;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
}

.aisle-header-pop {
  position: absolute;
  right: 8px;
  top: 52px;
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.14);
  padding: 6px 0;
  z-index: 60;
}

.aisle-header-pop button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 10px 16px;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--aisle-muted);
  cursor: pointer;
}

.aisle-header-pop button.unmatch {
  color: var(--aisle-tomato);
}

.aisle-thread-status {
  padding: 4px 16px 0;
  font-size: 12px;
  color: var(--aisle-muted);
}

.aisle-chat-c-thread .chat-box {
  flex: 1;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.aisle-chat-c-thread .messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: var(--aisle-cream);
}

.aisle-day-pill {
  align-self: center;
  background: #E8E2D6;
  color: var(--aisle-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  margin: 4px 0;
}

.aisle-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-self: stretch;
}

.aisle-msg-row.me {
  justify-content: flex-end;
}

.aisle-msg-row.them {
  justify-content: flex-start;
}

.aisle-msg-col {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.aisle-msg-row.me .aisle-msg-col {
  align-items: flex-end;
}

.aisle-msg-row.them .aisle-msg-col {
  align-items: flex-start;
}

.aisle-chat-c-thread .msg {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.aisle-msg-own-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.aisle-chat-c-thread .msg.me,
.aisle-chat-c-thread .msg.me.aisle-msg-own {
  background: var(--aisle-produce) !important;
  color: #fff !important;
  border-bottom-right-radius: 5px;
  padding-right: 34px;
  cursor: pointer;
}

.aisle-chat-c-thread .msg.them {
  background: #FFFBF4 !important;
  color: var(--aisle-ink) !important;
  border: none !important;
  border-bottom-left-radius: 5px;
}

.aisle-chat-c-thread .msg a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aisle-chat-c-thread .msg a:visited {
  color: inherit;
}

.aisle-msg-more {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 36px;
  min-height: 36px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 4px 6px;
  z-index: 2;
}

.aisle-side-time {
  font-size: 10px;
  color: var(--aisle-muted);
  padding-bottom: 2px;
  flex-shrink: 0;
  min-width: 28px;
}

.aisle-edited {
  font-size: 10px;
  color: var(--aisle-muted);
  margin-top: 2px;
}

.aisle-typing-bubble {
  align-self: flex-start;
  background: #FFFBF4;
  border-radius: 14px;
  padding: 8px 12px;
  display: inline-flex;
  gap: 4px;
}

.aisle-typing-bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C4BDB2;
  display: inline-block;
  animation: aisle-dot 1.1s infinite ease-in-out;
}

.aisle-typing-bubble i:nth-child(2) { animation-delay: 0.15s; }
.aisle-typing-bubble i:nth-child(3) { animation-delay: 0.3s; }

@keyframes aisle-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.aisle-chat-c-thread .chat-input-row {
  background: var(--aisle-cream);
  border-top: none;
  padding: 8px 12px 10px;
  gap: 8px;
  align-items: center;
}

.aisle-chat-c-thread .chat-input {
  margin: 0;
  background: #fff;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 14px;
}

.aisle-chat-c-thread .chat-send,
.aisle-chat-c-thread .chat-send.aisle-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--aisle-produce) !important;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aisle-edit-hint {
  font-size: 11px;
  color: var(--aisle-muted);
  padding: 0 16px 4px;
}

/* Action sheet */
.aisle-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.32);
  z-index: 220;
}

.aisle-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 84px;
  width: min(440px, calc(100% - 20px));
  z-index: 221;
}

.aisle-sheet-card,
.aisle-sheet-cancel {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.aisle-sheet-cancel {
  margin-top: 8px;
  width: 100%;
  border: none;
  padding: 14px;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--aisle-ink);
  cursor: pointer;
}

.aisle-sheet-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: none;
  padding: 14px 18px;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--aisle-ink);
  cursor: pointer;
  border-bottom: 1px solid #F0EBE3;
}

.aisle-sheet-row:last-child {
  border-bottom: none;
}

.aisle-sheet-row.delete {
  color: var(--aisle-tomato);
}

.aisle-sheet-ico {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.aisle-avatar-fallback {
  background: #E6E1D8 !important;
  color: var(--aisle-ink) !important;
}
