/* Blerjet box: purchase register, month, entry, monthly payments. Phone first. */

.blerjet h2 {
  margin: 0;
  font-size: 18px;
}

.blerjet .bl-pick {
  position: relative;
}

/* Rows: one tap opens the entry. */
.blerjet .bl-list,
.blerjet .bl-months,
.blerjet .bl-due-list,
.blerjet .bl-rules,
.blerjet .bl-suggest,
.blerjet .bl-suppliers ul,
.blerjet .bl-lines ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blerjet .bl-row,
.blerjet .bl-month,
.blerjet .bl-due-row {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.blerjet .bl-row:active,
.blerjet .bl-month:active,
.blerjet .bl-due-row:active {
  transform: scale(0.99);
}

.blerjet .bl-row-main,
.blerjet .bl-month,
.blerjet .bl-due-row,
.blerjet .bl-rule-top,
.blerjet .bl-suggest li,
.blerjet .bl-suppliers li,
.blerjet .bl-lines li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.blerjet .bl-row-main strong,
.blerjet .bl-month-name strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.blerjet .bl-row-amount,
.blerjet .bl-month-sum,
.blerjet .bl-rule-amount {
  display: grid;
  justify-items: end;
  gap: 2px;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.blerjet small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.blerjet .bl-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.blerjet .bl-month-name,
.blerjet .bl-due-row > span:first-child,
.blerjet .bl-rule-top > span:first-child,
.blerjet .bl-suggest li > span:first-child,
.blerjet .bl-suppliers li > span:first-child,
.blerjet .bl-lines li > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.blerjet .bl-month {
  min-height: 68px;
  align-items: center;
}

.blerjet .pill.bl-grey {
  color: var(--muted);
  background: var(--soft);
}

.blerjet .pill.bl-grey::before {
  background: var(--muted);
}

/* What is due these days. */
.blerjet .bl-due .bl-due-row {
  min-height: 56px;
  align-items: center;
  border-color: rgba(217, 135, 67, 0.35);
}

/* Totals of a month and of an entry. */
.blerjet .bl-big {
  display: grid;
  gap: 2px;
}

.blerjet .bl-big span {
  color: var(--muted);
  font-size: 14px;
}

.blerjet .bl-big strong {
  font-size: clamp(26px, 7vw, 34px);
  font-variant-numeric: tabular-nums;
}

.blerjet .bl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.blerjet .bl-table th,
.blerjet .bl-table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.blerjet .bl-table th:first-child {
  text-align: left;
  white-space: normal;
}

.blerjet .bl-table thead th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.blerjet .bl-table tbody th {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 420px) {
  .blerjet .bl-table {
    font-size: 13px;
  }

  .blerjet .bl-table th,
  .blerjet .bl-table td {
    padding: 8px 2px;
  }
}

.blerjet .bl-totals {
  overflow-x: auto;
}

.blerjet .bl-facts {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 8px 14px;
  margin: 0;
}

.blerjet .bl-facts dt {
  color: var(--muted);
  font-size: 14px;
}

.blerjet .bl-facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Lists inside a collapsible card. */
.blerjet details.card-block > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.blerjet .bl-suppliers li,
.blerjet .bl-lines li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.blerjet .bl-suppliers li > span:last-child,
.blerjet .bl-lines li > span:last-child {
  display: grid;
  justify-items: end;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Forms: big fields for the phone. */
.blerjet .bl-form input,
.blerjet .bl-form select {
  min-height: 48px;
  font-size: 17px;
}

.blerjet .bl-form .seg-field label {
  min-height: 48px;
}

.blerjet .bl-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.blerjet .bl-pay {
  margin-top: 4px;
}

.blerjet .bl-pay label {
  min-height: 48px;
}

/* Monthly payments. */
.blerjet .bl-rules > li {
  gap: 10px;
}

.blerjet .bl-rule-state {
  margin: 0;
}

.blerjet .bl-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blerjet .bl-rule-actions .button,
.blerjet .bl-suggest .button {
  min-height: 48px;
  padding: 0 18px;
  font-size: 16px;
}

.blerjet .bl-rule-actions .button.primary {
  flex: 1;
  justify-content: center;
}

.blerjet .bl-suggest li {
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.blerjet .button.wide {
  min-height: 52px;
}

@media (min-width: 781px) {
  .blerjet .bl-months {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
