.page-content:has(.assessment-surveys) {
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */

  &::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

.assessment-surveys {
  @media (max-width: 786px) {
    touch-action: pan-y;
    gap: var(--spacing-md);
  }

  .header-container {
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;

    .header-main-container {
      display: flex;
      flex-direction: row;
      flex: 1;
      min-width: 0;
      justify-content: center;
      align-items: center;
      gap: 12px;

      .header-title-container {
        display: flex;
        width: 60%;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: var(--spacing-xl);

        .header-title {
          font-size: var(--font-size-xl);
          line-height: var(--line-height-text-xl);
          font-weight: var(--weight-semi-bold);
          width: 100%;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
          text-align: center;
        }
      }

      i {
        color: var(--color-fg-quaternary);
        font-size: var(--font-size-xl);

        &:hover {
          color: var(--color-fg-quaternary_hover);
        }
      }

      @media (max-width: 786px) {
        gap: var(--spacing-sm);

        .header-title-container {
          flex: 1;
          min-width: 0;
          width: auto;
          gap: var(--spacing-sm);

          .header-title {
            font-size: var(--font-size-lg);
            min-width: 0;
          }
        }
      }
    }
  }

  .actions-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-secondary);

    i {
      color: var(--color-fg-quaternary);
      font-size: var(--font-size-xl);

      &:hover {
        color: var(--color-fg-quaternary_hover);
      }
    }

    .filters {
      background: var(--color-bg-primary);
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 24px;

      .filters-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;

        .filters-header-title {
          font-size: var(--font-size-md);
          line-height: var(--line-height-text-md);
          font-weight: var(--weight-bold);
        }

        .filters-header-actions {
          display: flex;
          align-items: center;
          gap: 24px;
          color: var(--color-fg-quaternary);
          font-size: var(--font-size-sm);
        }
      }

      .filters-body {
        display: flex;
        flex-direction: column;

        .filters-body-section {
          display: flex;
          flex-direction: column;
          gap: 16px;
          border-bottom: 1px solid var(--color-border-secondary);
          padding-bottom: 16px;
          padding-top: 16px;

          &:last-child {
            border-bottom: 0;
          }

          .filters-body-section-label {
            font-size: var(--font-size-md);
            line-height: var(--line-height-text-md);
          }
        }
      }
    }

    @media (max-width: 786px) {
      flex-wrap: wrap;
      gap: var(--spacing-sm);
      padding-bottom: var(--spacing-md);
    }
  }

  .applied-filters-container {
    display: inline-flex;
    gap: 16px;

    @media (max-width: 786px) {
      display: flex;
      flex-wrap: wrap;
      gap: var(--spacing-sm);
    }

    .applied-filter-badge {
      background: var(--color-bg-primary);
      padding: 6px 8px;
      border-radius: var(--border-radius-sm);
      border: 1px solid var(--color-border-tertiary);
      display: inline-flex;
      gap: 8px;
      font-size: var(--font-size-sm);
      line-height: var(--line-height-text-sm);

      .applied-filter-badge-name {
        color: var(--color-text-secondary);
        font-weight: var(--weight-regular);
      }

      .applied-filter-badge-value {
        color: var(--color-text-tertiary);
        font-weight: var(--weight-light);
        display: inline-flex;
        gap: 8px;
      }
    }
  }

  .footer-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: var(--spacing-3xl);

    .footer-slot {
      flex: 1;
      min-width: 0;
      display: flex;

      &.footer-slot-next {
        justify-content: flex-end;
      }
    }

    .footer-section {
      display: inline-flex;
      flex-direction: row;
      gap: var(--spacing-md);
      max-width: 100%;

      &.footer-section-right {
        text-align: right;
      }

      .footer-section-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;

        i {
          color: var(--color-fg-quaternary);
          font-size: var(--font-size-xl);

          &:hover {
            color: var(--color-fg-quaternary_hover);
          }
        }

        .footer-section-label {
          font-size: var(--font-size-xs);
          line-height: var(--line-height-text-xs);
          color: var(--color-text-tertiary);
          font-weight: var(--weight-regular);
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;

          @media (max-width: 786px) {
            font-size: var(--font-size-xxs);
            line-height: var(--line-height-text-xxs);
          }
        }

        .footer-section-title {
          font-size: var(--font-size-md);
          line-height: var(--line-height-text-md);
          color: var(--color-text-tertiary);
          font-weight: var(--weight-semi-bold);
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;

          @media (max-width: 786px) {
            font-size: var(--font-size-sm);
            line-height: var(--line-height-text-sm);
          }
        }
      }
    }
  }
}

.survey-sidenav-header-label {
  font-size: var(--font-size-xxs);
  line-height: var(--line-height-text-xxs);
  color: var(--color-text-secondary);
  font-weight: var(--weight-bold);
}

.root-page:not(.sidenav-closed) [data-ui--sidenav-target="openButton"] {
  display: none;
}

.survey-section-completion-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);

  &.fixed-width {
    width: 30%;

    @media (max-width: 786px) {
      width: 100%;
    }
  }

  &.pulse {
    min-height: 44px;
    background: var(--color-skeleton-from);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--border-radius-sm);
    animation: pulse-survey-card 0.8s ease-in-out infinite;
  }

  .survey-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
    line-height: var(--line-height-text-xs);

    .survey-section-heading-title {
      margin-right: 0;
      overflow: hidden;

      @media (min-width: 787px) {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow-wrap: break-word;
      }

      @media (max-width: 786px) {
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    .survey-section-heading-percentage {
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-text-quaternary);
      font-weight: var(--weight-light);
    }
  }
}

.survey-section-progress-bar {
  display: flex;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 9999px;

  &.wider {
    height: 6px;
  }

  .segment {
    height: 100%;

    &.answered {
      background-color: var(--color-fg-success-primary);
    }

    &.needs-confirmation {
      background-color: var(--color-fg-note-primary);
    }

    &.missing-answer {
      background-color: var(--color-bg-quaternary);
    }

    &.pulse {
      background: var(--color-skeleton-from);
      width: 100%;
      animation: pulse-survey-card 0.8s ease-in-out infinite;
    }
  }
}

@keyframes pulse-survey-card {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
