/* the page of Johny: the sections like the ones of Fred in INTECHI FINANCE */
/* One file for one part of the application: a change of that part touches only this file. */

/* ---- the sections of the page of the helper (the same as in INTECHI FINANCE) ---- */
.pay-sec {
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pay-sec.wait {
  border-left-color: #f59331;
  background: linear-gradient(180deg, #fff7ec, var(--card) 140px);
}
.pay-sec.done {
  border-left-color: #1a7f4b;
  background: linear-gradient(180deg, #eef9f2, var(--card) 140px);
}
.pay-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pay-sec-head h3 {
  margin: 0;
}
.pay-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.pay-chip.wait {
  background: #ffe7c7;
  color: #9a5200;
}
.pay-chip.done {
  background: #d3f0de;
  color: #14633b;
}
html[data-theme='dark'] .pay-sec.wait {
  background: linear-gradient(180deg, #3b2a12, var(--card) 140px);
}
html[data-theme='dark'] .pay-sec.done {
  background: linear-gradient(180deg, #12301f, var(--card) 140px);
}
html[data-theme='dark'] .pay-chip.wait {
  background: #4f3615;
  color: #ffcf94;
}
html[data-theme='dark'] .pay-chip.done {
  background: #15432b;
  color: #a6e6c0;
}
.pay-sec .pay-detail > summary.pay-month {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
}
.pay-sec .pay-detail > summary.pay-month::-webkit-details-marker {
  display: none;
}
.pay-sec .pay-detail > summary.pay-month::before {
  content: '▸';
  color: var(--accent);
  width: 14px;
}
.pay-sec .pay-detail[open] > summary.pay-month::before {
  content: '▾';
}
.fred-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 10px;
  object-fit: cover;
}
.pay-sec.info {
  border-left-color: #2e6fd6;
  background: linear-gradient(180deg, #eef4ff, var(--card) 140px);
}
.pay-chip.info {
  background: #dbe8ff;
  color: #1f4f9e;
}
html[data-theme='dark'] .pay-sec.info {
  background: linear-gradient(180deg, #14233f, var(--card) 140px);
}
html[data-theme='dark'] .pay-chip.info {
  background: #1c3560;
  color: #b7d0ff;
}
.pay-sec.info {
  gap: 2px;
}
.fred-level {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fred-level-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fred-meter {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  overflow: hidden;
}
.fred-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s;
}
.fred-meter.ready > span {
  background: #1a7f4b;
}

/* a file attached to a question of the chat (as in Finance): the clip beside the field, a chip with the name above it, and in the bubble of the question */
.johny-attach {
  flex: none;
  width: 40px;
  height: 40px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}
.johny-attach:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.johny-attach svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.johny-file-warn {
  color: #8a5a00;
}
.johny-file-preview {
  position: relative;
  align-self: flex-start;
  margin: 0 12px 6px;
}
.johny-file-preview[hidden] {
  display: none;
}
.johny-file-chip {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 16px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft, var(--card));
  font-size: 13px;
  font-weight: 600;
}
.johny-file-chip::before {
  content: '▦ ';
  color: var(--accent);
}
.johny-file-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: #1b1f23;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.johny-msg-file {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
