/* the home page: the tabs in the top bar, the banners (the flow of the deals and of the requests in 3D) */
/* One file for one part of the application: a change of that part touches only this file. */

/* the banners of the home page: the business funnel of the deals and the flow of the requests */
.banner-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.banner-head h2 {
  margin: 0;
}
.funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.funnel-row {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 220px);
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.funnel-bar {
  justify-self: center;
  width: var(--w, 100%);
  min-width: 190px;
  box-sizing: border-box;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--stage, var(--muted)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--stage, var(--muted)) 35%, transparent);
  border-left: 5px solid var(--stage, var(--muted));
  transition:
    transform 0.15s,
    background 0.15s;
}
.funnel-bar b {
  font-size: 22px;
}
.funnel-row:hover .funnel-bar {
  background: color-mix(in srgb, var(--stage, var(--muted)) 24%, transparent);
  transform: scaleX(1.015);
}
.funnel-sum {
  color: var(--muted);
  font-size: 13.5px;
}
.funnel-lost {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.funnel-lost .funnel-bar {
  min-width: 190px;
  opacity: 0.85;
}
.flow {
  display: flex;
  margin-top: 14px;
}
.flow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 16px 26px 14px;
  margin-left: -12px;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  background: color-mix(in srgb, var(--stage, var(--muted)) 14%, transparent);
  border-top: 4px solid var(--stage, var(--muted));
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
  transition: background 0.15s;
}
.flow-step:first-child {
  margin-left: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
}
.flow-step:hover {
  background: color-mix(in srgb, var(--stage, var(--muted)) 26%, transparent);
}
.flow-step b {
  font-size: 26px;
}
.flow-step span {
  font-weight: 600;
  font-size: 13.5px;
}
.flow-step small {
  color: var(--muted);
  font-size: 12px;
}
.flow-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.flow-aside .flow-parked {
  flex: none;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  padding: 10px 18px;
  margin-left: 0;
  clip-path: none;
  border-top: 0;
  border-left: 5px solid var(--stage);
  border-radius: 12px;
}
.flow-aside .flow-parked b {
  font-size: 20px;
}
@media (max-width: 760px) {
  .flow {
    flex-direction: column;
    gap: 6px;
  }
  .flow-step,
  .flow-step:first-child {
    margin-left: 0;
    clip-path: none;
    border-radius: 12px;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 16px;
  }
  .funnel-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .funnel-bar {
    width: 100%;
  }
  .funnel-sum {
    text-align: right;
  }
}

/* the lines of the flow in 3D: nothing moves aside, only the line on top of every arrow is a tube (lit above, dark below) and a glint of
   light runs along it from the first arrow to the last */
.flow {
  filter: drop-shadow(0 6px 6px rgba(21, 32, 27, 0.14));
}
.flow-step {
  position: relative;
  border-top: 0;
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.06)
  );
}
.flow-step::before,
.flow-step::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 7px;
  pointer-events: none;
}
.flow-step::before {
  right: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--stage, var(--muted)) 55%, #fff) 0%,
    var(--stage, var(--muted)) 45%,
    color-mix(in srgb, var(--stage, var(--muted)) 65%, #000) 100%
  );
}
.flow-step::after {
  width: 34%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0)
  );
  transform: translateX(-120%);
  animation: flow-run 5.2s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.55s);
}
@keyframes flow-run {
  0% {
    transform: translateX(-120%);
  }
  13% {
    transform: translateX(300%);
  }
  100% {
    transform: translateX(300%);
  }
}
.flow-step:nth-child(1) {
  --i: 0;
}
.flow-step:nth-child(2) {
  --i: 1;
}
.flow-step:nth-child(3) {
  --i: 2;
}
.flow-step:nth-child(4) {
  --i: 3;
}
.flow-step:nth-child(5) {
  --i: 4;
}
.flow-step:nth-child(6) {
  --i: 5;
}
.flow-parked {
  background-image: none;
}
.flow-parked::before,
.flow-parked::after {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .flow-step::after {
    animation: none;
    display: none;
  }
}

/* the card "Připomínky k vyřízení" (as in Finance): a frame in the colour of the reminders, rows with the day on the left, the title and what it is about */
.reminders {
  border-left: 4px solid #f59331;
  padding: 14px 18px;
  gap: 6px;
}
.reminders h3 {
  font-size: 17px;
}
.reminder {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.reminder:first-of-type {
  border-top: 0;
}
.reminder-when {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.reminder-title {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-weight: 700;
}
.reminder .note {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}
.reminder.overdue .reminder-when {
  color: #b3261e;
}
.reminder.today .reminder-when {
  color: #b26a00;
}
.reminder.auto.overdue .reminder-title {
  color: #b3261e;
}
.reminder.auto.today .reminder-title,
.reminder.auto.soon .reminder-title {
  color: #b26a00;
}
html[data-theme='dark'] .reminder.overdue .reminder-when {
  color: #ff8a80;
}
html[data-theme='dark'] .reminder.today .reminder-when {
  color: #f5b14a;
}
html[data-theme='dark'] .reminder.auto.overdue .reminder-title {
  color: #f2a7a7;
}
html[data-theme='dark'] .reminder.auto.today .reminder-title,
html[data-theme='dark'] .reminder.auto.soon .reminder-title {
  color: #f0c873;
}
@media (max-width: 860px) {
  .reminder {
    grid-template-columns: 1fr;
  }
  .reminder-when {
    grid-column: 1;
    grid-row: 1;
  }
  .reminder-title,
  .reminder .note {
    grid-column: 1;
    grid-row: auto;
    align-self: auto;
  }
}

/* the notices in sections (public/js/remsec.js): a title with the number, five notices in a box with a thin bar, "Show more" */
.rem-sec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rem-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: color-mix(in srgb, #f59331 85%, #fff);
  color: #2b1700;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.rem-count.late {
  background: #d93025;
  color: #fff;
}
.rem-list {
  position: relative;
}
/* the bar as in the menu: Chrome and Safari take the 8px one below (always visible), Firefox its own thin one */
.rem-list.capped {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
}
@supports (-moz-appearance: none) {
  .rem-list.capped {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ink) 28%, transparent) transparent;
  }
}
.rem-list.capped::-webkit-scrollbar {
  width: 8px;
}
.rem-list.capped::-webkit-scrollbar-track {
  background: transparent;
}
.rem-list.capped::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: 8px;
}
.rem-more {
  display: block;
  margin: 8px 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.rem-more:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}
.rem-more:focus-visible {
  outline: 3px solid #f59331;
  outline-offset: 2px;
}
